question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUESTION] Get Session from Graphql

See original GitHub issue

I’m not able to get the session from graphql.

req.session does not seem to work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
clayrissercommented, Jun 4, 2020

I figured out the issue. The problem was because the graphql playground was not sending the cookie. I fixed it with the following settings.

  playground: {
    settings: {
      "request.credentials": "include"
    }
  }
0reactions
clayrissercommented, Jun 4, 2020

It is after it.

https://github.com/codejamninja/appsaas-core/blob/master/src/main.ts#L34

I’ll see if I can create a simpler example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting session in resolvers using graphql and apollo-server
The problem here is that i can't get the session in the testFunc Resolver. The console.log(context) shows this: { _extensionStack: ...
Read more >
Authentication and authorization - Apollo GraphQL Docs
Control access to your GraphQL API · Authentication is determining whether a given user is logged in, and subsequently determining which user someone...
Read more >
3. Access Session Info In GraphQL Operations - SuperTokens
GraphQL passes the context object (refer to backend setup) to your resolvers, you can use this context to set and read session information....
Read more >
getSession() not working in a graphql endpoint with apollo ...
I'm setting up a project with next.js next-auth and graphql, but next-auth can't authenticate requests with getSession to the graphql endpoint.
Read more >
Authentication and Express Middleware - GraphQL
A query language for your API — GraphQL provides a complete description of the data in your API, gives clients the power to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found