Last active
June 6, 2022 08:44
-
-
Save mustafa-qamaruddin/953b1c7b4f857b1141995c34c2f1e5b3 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
# create account.1 | |
mutation createAccount($value:AccountInput!) { | |
createAccount(value:$value) | |
{ | |
id | |
instanceId | |
} | |
} | |
{ | |
"value": { | |
"hypi": { | |
"id": "u.1010" | |
}, | |
"username": "test1010", | |
"emails": {"value": "[email protected]"}, | |
"password": { | |
"value": "1234567890" | |
} | |
} | |
} | |
# create account.2 | |
mutation createAccount($value:AccountInput!) { | |
createAccount(value:$value) | |
{ | |
id | |
instanceId | |
} | |
} | |
{ | |
"value": { | |
"hypi": { | |
"id": "u.1011" | |
}, | |
"username": "test1011", | |
"emails": {"value": "[email protected]"}, | |
"password": { | |
"value": "1234567890" | |
} | |
} | |
} | |
# login account.2 and obtain token | |
{ | |
login( | |
username: "[email protected]", | |
password: "1234567890" | |
) { | |
sessionToken | |
} | |
} | |
# use token to create a paswordreminder for acc.1 | |
mutation upsert($values:HypiUpsertInputUnion!) { | |
upsert(values:$values){ | |
id | |
instanceId | |
} | |
} | |
{ | |
"values": { | |
"PasswordReminder": { | |
"hypi": {"id":"pr.1010"}, | |
"valid": true, | |
"to": { | |
"value": "[email protected]" | |
} | |
} | |
} | |
} | |
# get the password reset code | |
{ | |
get(type: PasswordReminder, id: "pr.1010") { | |
... on PasswordReminder { | |
hypi { | |
id | |
instanceId | |
createdBy | |
} | |
code | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment