-
Notifications
You must be signed in to change notification settings - Fork 16
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
Is this supported with express-graphql? #43
Comments
Sorry for the late reply. If you have an open-source repo it would make things easier for me to investigate. Not sure at this point how graphql-passport can work with express-graphql since it's been a while I worked with it 😉 |
I'm also no expert in express-graphql but I think the key is in adding context using the the const gqlServer = graphqlHTTP({
schema,
graphiql: true,
customExecuteFn: ({ contextValue: req, ...rest }: ExecutionArgs) =>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
execute({ ...rest, contextValue: buildContext({ req, res: {} }) }),
}); I created a test-branch for express-graphql here: https://github.com/gforge/subscription_example/tree/express-graphql Btw - the @ts-ignore is needed as the |
This is correct. If you use the context property for |
With the above comment, it works just find with Ensure you are using a |
I see that your server is set up with Apollo Server. I am trying to configure this using express-graphql - with minimal luck.
Would you like to see my code or will it not work with express-graphql?
The text was updated successfully, but these errors were encountered: