Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AugustoPedraza/ac3b70beb0feed2cce8267f7e3d5b566 to your computer and use it in GitHub Desktop.
Save AugustoPedraza/ac3b70beb0feed2cce8267f7e3d5b566 to your computer and use it in GitHub Desktop.
//
// The mutation
//
mutation test($createMember: CreateMemberViaOptInFormInput) {
createMemberViaOptInForm(input: $createMember) {
member {
createdVia
data
insertedAt
selfData
updatedAt
}
}
}
//
// Variables
//
{
"createMember": {
"memberData": "{\"firstName\":\"Augusto\",\"lastName\":\"Pedraza\",\"zipCode\":\"02111\",\"phoneNumber\":\"+5493815709003\"}",
"optInFormId": "123",
"lang": "ENGLISH"
}
}
//
// The errors response
//
{
"data": {
"createMemberViaOptInForm": null
},
"errors": [
{
"locations": [
{
"column": 0,
"line": 2
}
],
"message": "Looks like I already have your phone number into my account",
"path": [
"createMemberViaOptInForm"
],
"source": "business_validation"
},
{
"attr_name": "first_name",
"locations": [
{
"column": 0,
"line": 2
}
],
"message": "FIrst Name is empty",
"path": [
"createMemberViaOptInForm"
],
"source": "attr_validation"
},
{
"locations": [
{
"column": 0,
"line": 2
}
],
"message": "An error has occurred. Please, try it again",
"path": [
"createMemberViaOptInForm"
],
"source": "unknown"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment