with-apollo-auth example not working
See original GitHub issueExample name
Example name is with-apollo-auth
Examples bug report
I implemented the with-apollo-auth example. See this repo.
Every query is now Server Side Rendered using getDataFromTree, but… not one query. The me query, that is based on authentication cookie doesn’t work at all.
When I didn’t use the example and was happy with Client Side Rendering, the cookie and me query rendered properly. But, on SSR… backend doesn’t look like is sending any cookie.
Here’s the complete backend repo.
To Reproduce
- Clone this repo.
- Make
https://paprink-server.herokuapp.comthe endpoint. - See all queries work but not
mequery. - See the console logged variable
loggedInUserbe undefined.
Expected behavior
The expected behaviour was to see the paprinkToken cookie being parsed.
System information
- OS: MacOS Mojave
- Browser Chrome Latest
- Version of Next.js:
v8.1.0
Additional context
Have you tried the example? I saw the example uses graphcool but it isn’t clear about how you get the cookie.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
with-apollo-auth example not working #7418 - vercel/next.js
I implemented the with-apollo-auth example. See this repo. Every query is now Server Side Rendered using getDataFromTree , but... not one query.
Read more >Authentication - Apollo GraphQL Docs
Add an authorization header to every HTTP request by chaining together Apollo Links. In this example, we'll pull the login token from localStorage...
Read more >next-with-apollo, SSR does not work, request is done on client
Here is the solution I am using. It allows to wrap the page(main component) in the HOC and then make request ssr or...
Read more >Getting Started With Next.js and GraphQL Authentication
With Apollo Client, links are composable units, similar to middleware, that allow us to inject ... Authenticated GraphQL Requests In Next.js.
Read more >Token authentication with React and Apollo Client - Medium
Disclaimer : this article does not cover authentication on the ... is here : https://github.com/ovrsea/react-apollo-strapi-auth-example.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Experiencing the same issue
I’ve marked it as good first issue. There is no need to keep pinging on open issues.