[WIP] Implement GraphQL schema completion and subscription support#4200
Open
[WIP] Implement GraphQL schema completion and subscription support#4200
Conversation
Copilot stopped work on behalf of
makr-code due to an error
March 13, 2026 19:33
Copilot stopped work on behalf of
makr-code due to an error
March 13, 2026 19:58
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
You can also share your feedback on Copilot code review. Take the survey.
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.
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original prompt
This section details on the original issue you should resolve
<issue_title>GraphQL Schema Completion and Subscription Support</issue_title>
<issue_description>### Context
This issue implements the roadmap item 'GraphQL Schema Completion and Subscription Support' for the api domain. It is sourced from the consolidated roadmap under 🟠 High Priority — Near-term (v1.5.0 – v1.8.0) and targets milestone v1.7.0.
Primary detail section: GraphQL Schema Completion and Subscription Support
Goal
Deliver the scoped changes for GraphQL Schema Completion and Subscription Support in src/api/ and complete the linked detail section in a release-ready state for v1.7.0.
Detailed Scope
GraphQL Schema Completion and Subscription Support
Priority: High
Target Version: v1.7.0
graphql.cppimplements a full parser and query executor but lacks mutation resolvers, schema introspection (__schema,__type), and subscription over WebSocket. Complete the schema to cover documents, graph edges, vector search, and geospatial queries; addsubscriptionoperation support backed bycdc::Changefeed.Implementation Notes:
[x]AddSchemaRegistryclass tographql.cpp; auto-build from registeredTypeDefinitionobjects at server start.[x]Implement__schemaand__typeintrospection resolvers; required by all major GraphQL clients (Apollo, Relay).[x]Subscription transport: use Boost.Beast WebSocket upgrades; creategraphql_ws_handler.cppimplementing thegraphql-transport-wsprotocol (not the legacysubscriptions-transport-ws).[x]Wirecdc::Changefeed::subscribe(filter)as the event source forsubscription { onChange(collection: "...") { ... } }. Implemented:Changefeed::subscribe(SubscriptionFilter, SubscriptionCallback)+SubscriptionHandleRAII type inchangefeed.h/cpp; wired inGraphQLWsHandler::handleSubscribe()viaextractOnChangeCollection().[x]EnforceQueryLimits::maxSubscriptionsper connection to prevent fan-out DoS.[ ]Ingraphql.h, theParserclass explicitly documents "Not yet supported: Fragments, Directives, Inline fragments." ImplementparseFragmentDefinition()andparseInlineFragment()ingraphql.cpp— without fragment support, clients using Apollo's automatic persisted query fragments or any relay-style fragment composition will fail at parse time.[ ]graphql.h::Parser::error()is documented as deprecated ("Deprecated: UseResult<T>return types instead oferror()method") but the method still exists in the class definition. Remove it after migrating all call sites ingraphql.cppto returnthemis::Result<T>with structuredParseErrorobjects to eliminate the dual error-reporting path.[ ]Schema::introspect()ingraphql.cpponly handles__schemaand__typefields. The GraphQL June 2018 spec also requires__typenameon every composite type,__Field,__InputValue,__EnumValue, and__Directivemeta-types. Add these toSchema::introspect()so introspection-based tooling (code generators, schema diffing tools) works fully.[ ]Executor::executeSelections()ingraphql.cppresolves fields serially in a range-for loop. For independent sibling fields that each invoke storage I/O, this means sequential round-trips. Add parallel field resolution viastd::asyncor a small task graph; guard behind aQueryLimits::parallel_fields_enabledflag to allow gradual rollout.Performance Targets:
Changefeedevent emission to WebSocket frame sent.API Sketch:
Acceptance Criteria
SchemaRegistryclass tographql.cpp; auto-build from registeredTypeDefinitionobjects at server start.__schemaand__typeintrospection resolvers; required by all major GraphQL clients (Apollo, Relay).graphql_ws_handler.cppimplementing thegraphql-transport-wsprotocol (not the legacysubscriptions-transport-ws).cdc::Changefeed::subscribe(filter)as the event source forsubscription { onChange(collection: "...") { ... } }. Implemented:Changefeed::subscribe(SubscriptionFilter, SubscriptionCallback)+SubscriptionHandleRAII type inchangefeed.h/cpp; wired inGraphQLWsHandler::handleSubscribe()viaextractOnChangeCollection().QueryLimits::maxSubscriptionsper connection to prevent fan-out DoS.graphql.h, theParserc...💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.