can anyone here help me with the following? I’m tr...
# prisma-whats-new
r
can anyone here help me with the following? I’m trying to do a simple user query,
Copy code
query LoggedInUser {
    loggedInUser {
      id
    }
  }
where I see that i’m passing my graphcool token in the authorisation header (
Bearer ${token}
), I also verified the token on jwt.io and everything seems correct, but I keep getting back
user: null
😖
p
Are you using custom resolvers?
I am not aware of a loggedInUser query on graphcool. There us "user" though
also try testing your queries in the playground. you can set the logged in user top right
r
thanks for replying @Pieter!
I’m using a resolver yes, everything is from the facebook-auth template
and when I perform the query in the playground it does work, but only when I specifically select my user
p
if you using custom resolvers then you already know more than me 😛
just make sure the token is actually passed properly. If you using server side rendering the token wont be available on localstorage
r
hmm looks like it’s being passed correctly, because I can see it in the network request header
strange..
p
very strange
f
Did you ever figure this out @rick? I am also having this issue.
r
@falconerd yes, what I did was writing the query like this:
Copy code
query  {
    user {
      id
    }
  }