-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqueries.gql
79 lines (69 loc) · 1.3 KB
/
queries.gql
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
79
# NOTE: You can use the GraphQL Playground to run these queries. Remember to comment out the queries you do not wish to execute, leaving only the single query you intend to run.
# After authentication, you can use the access token to access the protected routes using the Authorization header.
mutation {
SignUpAndCreateProfile(
name: "Bob"
email: "[email protected]"
password: "Password@123"
clientId: "123abc"
) {
account {
id
}
profile {
name
}
token {
access
refresh
}
}
}
mutation {
SignUp(
email: "[email protected]"
password: "Password@123"
clientId: "123abc"
) {
account {
id
}
token {
access
refresh
}
}
}
mutation {
CreateProfile(name: "Bob") {
name
}
}
# You can set `$refresh_token` in the query variables section
# Access token is valid for a short period of time, you can use the refresh token to get a new tokens
mutation RefreshToken($refresh_token: String!) {
RefreshToken(token: $refresh_token) {
access
refresh
}
}
mutation {
CreateRoom(name: "Friends Group", type: group) {
information {
id
name
}
members {
id
name
}
}
}
# You can set `$room_id` in the query variables section
mutation CreateMessage($room_id: String!) {
CreateMessage(roomId: $room_id, content: "Hello world!") {
id
content
senderId
}
}