Title
r

rein

10/16/2017, 9:13 PM
is there a way to directly access the result of a mutation?
h

huv1k

10/16/2017, 9:28 PM
use {} after mutation and what you want from mutation
for example:
mutation updateUserImage($id: ID!, $imageId: ID!) {
    updateUser(id: $id, imageId: $imageId) {
      image {
        secret
      }
    }
  }
r

rein

10/16/2017, 9:56 PM
I got that but I need the id directly when its returned
I guess a promise would do it
I mean use .then or await
m

mwickett

10/16/2017, 10:04 PM
for example:
mutation updateUserImage($id: ID!, $imageId: ID!) {
    updateUser(id: $id, imageId: $imageId) {
      image {
        id 
        secret
      }
    }
  }
Just do that