i'm having trouble creating (`createUser`) and the...
# prisma-whats-new
a
i'm having trouble creating (
createUser
) and then accessing the newly created
User
object in my react-native and apollo + auth0 + graphcool app. this page (https://www.graph.cool/docs/reference/simple-api/user-authentication-eixu9osueb/#auth0-social-logins) says that like all mutations,
createUser
returns the newly created object. i'm using a mutation much like this:
Copy code
mutation {
  createUser(authProvider: {
    auth0: {
      idToken: "<idToken>"
    }
  }) {
    id
  }
}
i want the new object to be at
this.props.data.user
— that's the name of my usual query for logged-in users. for this new user case, it is returned in
this.props.data.createUser
which i understand is the name of the mutation. how do I
createUser
and then query/return the new user object as i ordinarily would (so that it is returned in
this.props.user
)?
n
@adamibaker hm I'm not aware of a case where a mutation returns a prop using Apollo Client. Instead, a mutation returns a promise with the returned data. am I missing something?