Is the `user` query that grabs data on the user pa...
# prisma-whats-new
m
Is the
user
query that grabs data on the user passed in the header going to be deprecated for CLI projects?
a
I believe so. The reasoning behind it is this: because you are no longer restricted to the
User
Type when creating tokens, the back-end does not know anymore what 'current user' means. For example, if you have a MyUser type, your authentication function can call generateNodeToken on a MyUser node, and you would need a
myUser
query to get the 'current user'. You can implement this query yourself, although the fact that you cannot return model types from resolver functions yet, is a bit limiting. You can easily create a query like this in a Gateway though.
m
Ok, thank you so much! 🙂 This has had me stumped for a few days now
👍🏻 1
t
Is there a link where they said
user
will be deprecated? @Michael Jones
m
Not directly, but for the CLI I believe they will be removing it, take a look at the header: https://www.graph.cool/docs/reference/graphql-api/query-api-nia9nushae/#the-authenticated-user-(only-for-legacy-console-projects)
t
Thanks! (: