Is there a way to access the currently signed in u...
# prisma-whats-new
b
Is there a way to access the currently signed in user?
a
user
following this but always returning null so maybe I have a problem
a
Are you authenticating correctly?
e.g. passing in the right token in the Authorization header, prefix with
Bearer
?
b
not using Bearer.
is there any sample? The examples I found were all using older react-apollo versions
a
Not sure
k
I am also running into the same problem following the apollo example, id always returns null.
Using something like
Copy code
const LOGGED_IN_USER_QUERY = gql`
  query LoggedInUserQuery {
    loggedInUser {
      id
    }
  }
`
a
Check the network tab, see if the request header Authorization indeed is
Bearer ej........
So with Bearer
k
Ah, my problem was that
Bearer
was not there, thanks!
🎉 1
b
ah ok solved as well thanks
🎉 1