Skip to content

Commit

Permalink
Merge pull request #70 from hashlash/patch-1
Browse files Browse the repository at this point in the history
Fix refreshToken api documentation payload example
  • Loading branch information
PedroBern committed Oct 4, 2020
2 parents 3c8c0f8 + 05aebe3 commit 429041a
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,38 +467,51 @@ mutation {

```bash tab="graphql"
mutation {
revokeToken(
refreshToken(
refreshToken: "d9b58dce41cf14549030873e3fab3be864f76ce44"
) {
success,
errors,
revoked
payload,
refreshExpiresIn,
token,
refreshToken
}
}
```

```bash tab="success"
{
"data": {
"revokeToken": {
"refreshToken": {
"success": true,
"errors": null,
"revoked": 1579458880
"payload": {
"username": "skywalker",
"exp": 1601646082,
"origIat": 1601645782
},
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InNreXdhbGtlciIsImV4cCI6MTYwMTY0NjA4Miwib3JpZ0lhdCI6MTYwMTY0NTc4Mn0.H6gLeky7lX834kBI5RFT8ziNNfGOL3XXg1dRwvpQuRI",
"refreshToken": "a64f732b4e00432f2ff1b47537a11458be13fc82",
"refreshExpiresIn": 1602250582
}
}
}
```

```bash tab="relay"
mutation {
revokeToken(
refreshToken(
input: {
refreshToken: "d9b58dce41cf14549030873e3fab3be864f76ce44"
}
) {
success,
errors,
revoked
payload,
refreshExpiresIn,
token,
refreshToken
}
}
```
Expand All @@ -507,7 +520,7 @@ mutation {
```bash tab="Invalid token"
{
"data": {
"revokeToken": {
"refreshToken": {
"success": false,
"errors": {
"nonFieldErrors": [
Expand All @@ -516,8 +529,7 @@ mutation {
"code": "invalid_token"
}
]
},
"revoked": null
}
}
}
}
Expand Down Expand Up @@ -554,7 +566,7 @@ mutation {
"success": true,
"errors": null,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImpvZWpvZSIsImV4cCI6MTU4MDE0MjE0MCwib3JpZ0lhdCI6MTU4MDE0MTg0MH0.BGUSGKUUd7IuHnWKy8V6MU3slJ-DHsyAdAjGrGb_9fw",
"refreshToken":
"refreshToken": "d9b58dce41cf14549030873e3fab3be864f76ce44"
}
}
}
Expand Down

0 comments on commit 429041a

Please sign in to comment.