I am getting super weird behaviour. I'd like to cr...
# prisma-whats-new
w
I am getting super weird behaviour. I'd like to create the user the first time he/she logs in with Auth0. I've set my mutation permissions to
Authenticated -> Create
for
User
. When I send a
createUser
mutation with appropriate headers I get
Error: GraphQL error: Insufficient Permissions
, BUT, in a Data section I can see that the user is actually successfully created! I am so confused. Am I doing something wrong?
n
@wasd171 I believe the permission error is for the READ permission for the data in the response
w
@nilan weird, my permissions for READ are the same
n
the response of
createUser
is NOT supposed to be authenticated if there is no Auth header
w
@nilan I am not getting it. So my Auth header is good enough to create the user, but not good enough to read it?
n
oh so you are providing an auth header with the request?
w
yes, basically I am sending
createUser
with Auth0 header, user gets created, the only thing I am quering for as a response for this mutation is id, but I get permissions error
n
ok so there is no permission that would allow
EVERYONE
to create a user?
w
n
and you pass a token into the mutation itself, and as well as the
Authorization
header?
w
Yes, I've double-checked it
n
hm is there a permission query for the read permission?
w
no, just
Authentication required
and
APPLY TO WHOLE TYPE
allowing everyone to READ user fixes it though
but, obviously, it's a semi-solution