Using operationName immediately closes the connection
See original GitHub issueUsing operationName variable in client.subscribe
immediately closes the connection
{
query,
variables,
extensions: {
userId: context?.userId,
},
operationName: context?.rootOperationInfo?.operationName,
}
As soon as I remove the operationName, it works. I’m using version “graphql-ws”: “^4.7.0” As a workaround I am using
{
query,
variables,
extensions: {
userId: context?.userId,
operationName: context?.rootOperationInfo?.operationName,
},
}
Please let me know if you need more info.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
API Reference: ApolloServer - Apollo GraphQL Docs
Wait for all connections to be closed; After a grace period, if any connections remain active, forcefully close them. If you're using startStandaloneServer...
Read more >GraphQL error: No operation named "" · Issue #1760 - GitHub
Just started getting this error this morning using the Shopify Storefront API. I resolved it using a similar method as @leowmjw: import { ......
Read more >Remote Desktop Connection closed immediately after ...
In this case perform a system file check: - Press Windows Key + X to open Win + X menu. Now select Command...
Read more >Connection closes immediately on open - Stack Overflow
To replicate run the python code as admin, open any JS console and enter the JS code. My desired outcome is for the...
Read more >centos - SSH closing by itself - root works fine - Server Fault
I'm trying to connect to a server but if i use any other user than root the connection closes itself after a successful...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay so in the error cb here
I get the error
[ { message: 'Unable to identify operation' } ]
thrown from the line here. I think I know why the error occurs: the operation name in the document is actually notcontext?.rootOperationInfo?.operationName
for a workaround that I am using 😃Just surround your server callbacks with a try/catch and log the caught errors.