I have 3 mutations in a query. 6 input parameters. If (profile_status === true), then send the mutation. And so for each mutation. How to do it?
mutation updateProfile(
$input: UpdateProfileMutationInput!
$input2: UpdateUserEmailMutationInput!
$input3: UpdateUserPasswordMutationInput!
$profile_status: Boolean!
$email_status: Boolean!
$password_status: Boolean!
) {
@include(if: $profile_status) updateProfile(input: $input) {
...CoreUser
}
@include(if: $email_status) updateEmail(input: $input2) {
...CoreUpdateUserEmail
}
@include(if: $password_status) updatePassword(input: $input3) {
...CoreUpdateUserPassword
}
}
I use @apollo/client. Include only works for fields. Is there a similar one for mutation?