fix: allow creation of event driven subgraphs#18
Merged
Noroth merged 3 commits intoAug 20, 2025
Merged
Conversation
alepane21
reviewed
Aug 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for event-driven subgraphs, refines the handling of subgraph attributes based on their type, and improves protocol resolution logic throughout the codebase. The main changes can be grouped into documentation updates, resource and API logic improvements, and expanded testing.
Support for event-driven subgraphs and improved protocol handling:
Documentation and resource schema updates:
cosmo_subgraphto clarify thatrouting_urlis required only for normal subgraphs and optional for event-driven subgraphs. The field is now marked as optional and computed. [1] [2]Resource and API logic improvements:
routing_url,subscription_url,subscription_protocol, andwebsocket_subprotocolare omitted from requests and set to null, ensuring correct API usage. [1] [2]ResolveWebsocketSubprotocol,ResolveSubscriptionProtocol) to accept pointer types, allowing for proper handling of optional protocol fields and avoiding default assignments when fields are omitted. Updated all relevant resource and API calls to use the new pointer-based logic. [1] [2] [3] [4] [5] [6]Testing and validation:
TestAccSubgraphEventDrivenSubgraph) and supporting configuration function to validate the creation and management of event-driven subgraphs, ensuring that omitted fields behave as expected. [1] [2]Schema enhancements for event-driven subgraphs:
TestAccValidEventDrivenSubgraphSchema) with various event-driven directives and types to support robust testing of event-driven subgraph features.