im following this guide to setting up Auth0: <http...
# prisma-whats-new
b
im following this guide to setting up Auth0: https://www.graph.cool/docs/tutorials/react-apollo-auth0-pheiph4ooj/#1.1-creating-the-project they use this code
Copy code
query userQuery {
    user {
      id
    }
  }
wouldnt this query just return a list of userIds?
a
@be4r You can test it in the Playground in the Console. It only returns the current user id.
b
i tried in console
@agartha it expects a userId to be passed in the query but i have no idea how its doing that in the sample project in the article
a
You can copy paste the query and run it. It needs no input

https://pasteboard.co/mvzpZRlo.png

b
oh thats strange
i actually did { User { id } }
a
small u
b
how is that different than: query { user {
id
a
User != user
b
what is user?
reading the docs and not sure how it works
a
User is the Type, you use a Type in a query to get a single node from that Type
user (lowercase) is a special query that returns the current user
and does not require any parameters
b
how does graphcool know which one is the current user?
thanks for all your help by the way
a
By the token send in the authentication header with the request
that's why the query only works in the playground when you select a user (top right corner)
b
ahh i see
thank you so much!
👍🏻 1