Different context for each resolver #1137
Unanswered
johannbuscail
asked this question in
Q&A
Replies: 1 comment
-
Context is execution context for the whole GraphQL document you send by client and execute on the server. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use Neo4j Driver to connect my app to my database.
Before each resolver, I would like to create a session and close it once the resolver ends.
I tried creating a middleware to put the session in the context:
I was thinking the context would be different for each resolver, but it's not.
For each resolver, it overrides the session that was created before.
At then, it only closes the last session that was created in the context.
Beta Was this translation helpful? Give feedback.
All reactions