Remove error field from query
This commit is contained in:
parent
d46cc7a177
commit
ebc8d070f6
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
"__schema": {
|
"__schema": {
|
||||||
"queryType": {
|
"queryType": {
|
||||||
"name": "Query"
|
"name": "Query"
|
||||||
|
|
@ -174,22 +173,6 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "errors",
|
|
||||||
"description": null,
|
|
||||||
"args": [],
|
|
||||||
"type": {
|
|
||||||
"kind": "LIST",
|
|
||||||
"name": null,
|
|
||||||
"ofType": {
|
|
||||||
"kind": "OBJECT",
|
|
||||||
"name": "RegistrationError",
|
|
||||||
"ofType": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"isDeprecated": false,
|
|
||||||
"deprecationReason": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "clientMutationId",
|
"name": "clientMutationId",
|
||||||
"description": null,
|
"description": null,
|
||||||
|
|
@ -228,29 +211,6 @@
|
||||||
"enumValues": null,
|
"enumValues": null,
|
||||||
"possibleTypes": null
|
"possibleTypes": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"kind": "OBJECT",
|
|
||||||
"name": "RegistrationError",
|
|
||||||
"description": null,
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"name": "field",
|
|
||||||
"description": null,
|
|
||||||
"args": [],
|
|
||||||
"type": {
|
|
||||||
"kind": "SCALAR",
|
|
||||||
"name": "String",
|
|
||||||
"ofType": null
|
|
||||||
},
|
|
||||||
"isDeprecated": false,
|
|
||||||
"deprecationReason": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inputFields": null,
|
|
||||||
"interfaces": [],
|
|
||||||
"enumValues": null,
|
|
||||||
"possibleTypes": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"kind": "INPUT_OBJECT",
|
"kind": "INPUT_OBJECT",
|
||||||
"name": "RegistrationInput",
|
"name": "RegistrationInput",
|
||||||
|
|
@ -258,7 +218,7 @@
|
||||||
"fields": null,
|
"fields": null,
|
||||||
"inputFields": [
|
"inputFields": [
|
||||||
{
|
{
|
||||||
"name": "confirmationKeyInput",
|
"name": "confirmationKey",
|
||||||
"description": null,
|
"description": null,
|
||||||
"type": {
|
"type": {
|
||||||
"kind": "SCALAR",
|
"kind": "SCALAR",
|
||||||
|
|
@ -268,7 +228,7 @@
|
||||||
"defaultValue": null
|
"defaultValue": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "userIdInput",
|
"name": "userId",
|
||||||
"description": null,
|
"description": null,
|
||||||
"type": {
|
"type": {
|
||||||
"kind": "SCALAR",
|
"kind": "SCALAR",
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,5 @@ mutation Registration($input: RegistrationInput!) {
|
||||||
registration(input: $input) {
|
registration(input: $input) {
|
||||||
success
|
success
|
||||||
message
|
message
|
||||||
errors {
|
|
||||||
field
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ export default {
|
||||||
client: 'publicClient',
|
client: 'publicClient',
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
confirmationKeyInput: this.$route.query.confirmation,
|
confirmationKey: this.$route.query.confirmation,
|
||||||
userIdInput: this.$route.query.id
|
userId: this.$route.query.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchPolicy: 'no-cache'
|
fetchPolicy: 'no-cache'
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ from users.user_signup_login_handler import handle_user_and_verify_products, UNK
|
||||||
class Registration(relay.ClientIDMutation):
|
class Registration(relay.ClientIDMutation):
|
||||||
class Input:
|
class Input:
|
||||||
confirmation_key = graphene.String()
|
confirmation_key = graphene.String()
|
||||||
user_id_input = graphene.Int()
|
user_id = graphene.Int()
|
||||||
|
|
||||||
success = graphene.Boolean()
|
success = graphene.Boolean()
|
||||||
message = graphene.String()
|
message = graphene.String()
|
||||||
|
|
@ -28,7 +28,7 @@ class Registration(relay.ClientIDMutation):
|
||||||
@classmethod
|
@classmethod
|
||||||
def mutate_and_get_payload(cls, root, info, **kwargs):
|
def mutate_and_get_payload(cls, root, info, **kwargs):
|
||||||
confirmation_key = kwargs.get('confirmation_key')
|
confirmation_key = kwargs.get('confirmation_key')
|
||||||
user_id = kwargs.get('user_id_input')
|
user_id = kwargs.get('user_id')
|
||||||
|
|
||||||
hep_client = HepClient()
|
hep_client = HepClient()
|
||||||
admin_token = AdminData.objects.get_admin_token()
|
admin_token = AdminData.objects.get_admin_token()
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class RegistrationTests(TestCase):
|
||||||
return self.client.execute(mutation, variables={
|
return self.client.execute(mutation, variables={
|
||||||
'input': {
|
'input': {
|
||||||
'confirmationKey': confirmation_key,
|
'confirmationKey': confirmation_key,
|
||||||
'userIdInput': user_id
|
'userId': user_id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue