Skip to content

Conversation

wravery
Copy link
Contributor

@wravery wravery commented Feb 6, 2019

Apollo may use a single websocket connection to perform queries, mutations, and subscriptions. To dispatch requests based on the operation type (particularly subscriptions which need to call subscribe instead of resolve), consumers need to be able to lookup the named (or unnamed when there's only one) operation in the query AST and get the operation type.

This also cuts down on a lot of code duplication between OperationDefinitionVisitor and SubscriptionDefinitionVisitor.

@wravery wravery merged commit 12936c0 into master Feb 6, 2019
@wravery wravery deleted the operationtypes branch February 6, 2019 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant