-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Filter operationType
in payload of GraphQLWsLink
#12950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 70fd5f7 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
size-limit report 📦
|
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 56709918740f98def7df7072 |
src/link/subscriptions/index.ts
Outdated
const { operationType, ...request } = operation; | ||
return this.client.subscribe<ApolloLink.Result>( | ||
{ ...operation, query: print(operation.query) }, | ||
{ ...request, query: print(operation.query) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think - should we just be a bit more specific here and only pass in known properties?
const { query, variables, operationName, extensions} = operation;
return this.client.subscribe<ApolloLink.Result>(
{ variables, operationName, extensions, query: print(query) },
Fixes #12946
Removes the
operationType
key in the payload sent byGraphQLWsLink
which was causing issues with HotChocolate.