Is it meanwhile possible to use the result of a GraphQL mutation as a parameter for another mutation?
I would like to create a user and his address together in one call.
First I write the address and then take the address id for the creation of the user. Filling the necessary data via the inputs works perfectly
Is this possible without triggering a new mutation from the client?
const createUser = gql`
mutation createUser(
$user: createUserInput!
$address: createAddressInput!
) {
createAddress(input: $address) {
address {
id
}
}
createUser(input: $user ) {
user {
id
username
}
}
}
`