is there a way to directly access the result of a ...
# prisma-whats-new
r
is there a way to directly access the result of a mutation?
h
use {} after mutation and what you want from mutation
for example:
Copy code
mutation updateUserImage($id: ID!, $imageId: ID!) {
    updateUser(id: $id, imageId: $imageId) {
      image {
        secret
      }
    }
  }
r
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
for example:
Copy code
mutation updateUserImage($id: ID!, $imageId: ID!) {
    updateUser(id: $id, imageId: $imageId) {
      image {
        id 
        secret
      }
    }
  }
Just do that