The error you’re experiencing might occur due to several reasons. Here are a couple things you might want to check:
Invalid Access Token: Make sure your customerAccessToken is valid. Access tokens can expire, so you should ensure it’s up-to-date.
Incorrect Syntax: Look for any syntax errors in your mutation. In your case, there is a comma , before `metafields which may be causing a syntax error.
Permissions: Ensure that you have the necessary permissions to update the customer’s metafields.
Valid Namespace and Key: Make sure the namespace and key you are trying to update actually exist for this customer.
Proper Value Input: Ensure that the value and valueType you are trying to update are compatible. In your case, it looks correct as you’re a string value.
When i use Shopify GraphiQL App working fine mutation customerUpdate($input: CustomerInput!) {
customerUpdate(input: $input) {
userErrors {
message
field
}
customer {
firstName
lastName
email
id
phone
metafields(first: 10) {
edges {
node {
namespace
key
value
id
}
}
}
}
}
}
but when run same code in postmen its node working and return this error
Error: CustomerInput isn’t a defined input type (on $input)"
I have checked everything and also i have set HTTP-headers