Skip to content
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

[appllo-server-koa]resolver function can not get context #1551

Closed
limerickgds opened this issue Aug 18, 2018 · 3 comments
Closed

[appllo-server-koa]resolver function can not get context #1551

limerickgds opened this issue Aug 18, 2018 · 3 comments

Comments

@limerickgds
Copy link
Contributor

Query: {
user(root, { id }, ctx) {
console.log(ctx);
},
}

ctx is :
image

not koa.context

@limerickgds
Copy link
Contributor Author

@evans

@duckywang1
Copy link

Related to #1392
// Please notice the following param -> 'context'
const server: ApolloServer = new ApolloServer({
typeDefs: xx,
resolvers: xx,
context: ({ ctx }) => ctx, // this is the key part
});

@limerickgds
Copy link
Contributor Author

@duckywang1 ths

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants