forked from canduma/canduma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEST.http
78 lines (63 loc) · 1.32 KB
/
TEST.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
###
# @name graphqli
GET http://canduma.localhost.tv:3000/graphiql
###
# @name register
POST http://canduma.localhost.tv:3000/user/register HTTP/1.1
Content-Type: application/json
{
"name": "my name",
"email": "email2@nowhere.com",
"password": "password"
}
###
# @name login
POST http://canduma.localhost.tv:3000/user/login HTTP/1.1
Content-Type: application/json
{
"email": "email2@nowhere.com",
"password": "password"
}
###
# @name getMyAccount
GET http://canduma.localhost.tv:3000/user/me HTTP/1.1
###
# @name getJwtToken
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query tokenQuery {
generateToken {
bearer
}
}
###
# @name decodeJwtToken
@jwtToken = {{getJwtToken.response.body.$.data.generateToken.bearer}}
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Authorization: Bearer {{jwtToken}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query decodeTokenQuery {
decodeToken {
email
iss
iat
exp
sub
}
}
###
# @name listUsers
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Authorization: Bearer {{jwtToken}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query ListUsers {
users {
name
userUuid
email
createdAt
}
}