Skip to content
Discussion options

You must be logged in to vote

For anyone else looking to do something similar to what I am, I have figured out the missing setting on the apollo server.

const apolloServer = new ApolloServer({
    context: ctx => ctx,
    /**
     * Add introspection to view the schema / docs in playground after running `next build` and `next start`
     * Without introspection, you'll get a message saying "Server cannot be reached"
     */
    introspection: true,
    playground: {
        settings: {
            'request.credentials': 'same-origin'
        }
    },
    schema
});

Adding the playground settings did the trick for me. Now I have access to my session cookie with each of my resolvers.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Kinbaum
Comment options

@Kinbaum
Comment options

Comment options

You must be logged in to vote
1 reply
@kukicado
Comment options

Answer selected by Kinbaum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants