Skip to content

Instantly share code, notes, and snippets.

@mustafa-qamaruddin
Last active June 6, 2022 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafa-qamaruddin/953b1c7b4f857b1141995c34c2f1e5b3 to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/953b1c7b4f857b1141995c34c2f1e5b3 to your computer and use it in GitHub Desktop.
# create account.1
mutation createAccount($value:AccountInput!) {
createAccount(value:$value)
{
id
instanceId
}
}
{
"value": {
"hypi": {
"id": "u.1010"
},
"username": "test1010",
"emails": {"value": "test1010@crlog.io"},
"password": {
"value": "1234567890"
}
}
}
# create account.2
mutation createAccount($value:AccountInput!) {
createAccount(value:$value)
{
id
instanceId
}
}
{
"value": {
"hypi": {
"id": "u.1011"
},
"username": "test1011",
"emails": {"value": "test1011@crlog.io"},
"password": {
"value": "1234567890"
}
}
}
# login account.2 and obtain token
{
login(
username: "test1011@crlog.io",
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": "test1010@crlog.io"
}
}
}
}
# 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