You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
I had an issue with this part, seems context doesn't get a request object in such setup:
app.use('/graphql',bodyParser.json(),gramps.addContext,// Add the extra contextgraphqlExpress({
schema,// Use the merged schema...context: gramps.context,// ...and the GrAMPS context object}),);
So I had to rewrite it to:
app.use('/graphql',bodyParser.json(),gramps.addContext,// Add the extra contextgraphqlExpress(req=>({
schema,// Use the merged schema...context: gramps.context(req),// ...and the GrAMPS context object})),);
Also I've noticed extraContext callback is called twice for a single query.
Thanks for a great library !
While checking how to extract schema from gramps I've found great example here: https://gramps.js.org/api/gramps/
I had an issue with this part, seems context doesn't get a request object in such setup:
So I had to rewrite it to:
Also I've noticed extraContext callback is called twice for a single query.
Maybe the idea is to pass req.gramps to apollo express middleware as config object ?
It would be great to see some clarification on above so I can work on PR to improve that ?
The text was updated successfully, but these errors were encountered: