We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
schema.addToContext
Embrace that context is a core data concept of a Nexus app
Remove it in favour of the proposed middleware system server middleware #523
Example
server.middleware((request, response, context) => { context.foo = 'bar' })
Global context can be addable like so:
import { context } from 'nexus' context.foo = 'bar'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Perceived Problem
schema.addToContext
encourages writing middleware where it should NOT beschema.addToContext
is an API awkwardly between server/schema componentsschema.addToContext
functionally overlaps with middleware in some waysIdea
Embrace that context is a core data concept of a Nexus app
Remove it in favour of the proposed middleware system server middleware #523
Example
Global context can be addable like so:
The text was updated successfully, but these errors were encountered: