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.

with-apollo-auth example not working

See original GitHub issue

Example 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

  1. Clone this repo.
  2. Make https://paprink-server.herokuapp.com the endpoint.
  3. See all queries work but not me query.
  4. See the console logged variable loggedInUser be 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:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
redhouse877commented, May 29, 2019

Experiencing the same issue

1reaction
timneutkenscommented, May 30, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

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