-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to use graph-ws instead #3
Comments
Can you please guide me from where to start my investigation, I'll post the answer if I find it |
Nothing to do with |
useServer(
// from the previous step
{ schema: GraphQlSchema, roots: {} },
server
); |
Hi Paul, Sorry for the late reply, I had issues with docker, I was unable to test. I tried your solution today, the server starts flawlessly. However, I have an issue with the resolvers: 2nd and 3rd arguments are not passed anymore: in the following example arg2 and context are both null
Here's my server init code for refrerence:
|
Hi Paul, I received this answer from the GraphQL-ws team: This is what he writes: The roots option is a convenience that gets injected to the rootValue during graphql's execute or subscribe by operation type. Line 738 in f2a92af execArgs.rootValue = roots?.[operationAST.operation]; In your case (from the referenced issue), the roots option can be completely omitted as it does nothing anyway. |
Hi,
Thanks for this project that simplifies the burden on how to setup subscription. My issue is that it relies on subscriptions-transport-ws which is deprecated to the benefit of https://the-guild.dev/blog/graphql-over-websockets as mentioned on their npm page:
So I'm struggling about how to get the roots of my gql schema from the object returned by
schemaComposer.buildSchema()
The text was updated successfully, but these errors were encountered: