Created
December 4, 2019 10:38
-
-
Save AugustoPedraza/ac3b70beb0feed2cce8267f7e3d5b566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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