forked from ScuffleCloud/scuffle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
101 lines (94 loc) · 1.86 KB
/
schema.graphql
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
"""
The mutation object for authentication
"""
type AuthMutation {
"""
Login using a username and password. If via websocket this will authenticate the websocket connection.
"""
login(captchaToken: String!, password: String!, username: String!, validity: Int): Session!
"""
Login with a session token. If via websocket this will authenticate the websocket connection.
"""
loginWithToken(sessionToken: String!, updateContext: Boolean): Session!
"""
Logout the user with the given session token. This will invalidate the session token.
"""
logout(sessionToken: String): Boolean!
"""
If successful will return a new session for the account which just got created.
"""
register(
captchaToken: String!
email: String!
password: String!
username: String!
validity: Int
): Session!
}
scalar DateRFC3339
"""
The root mutation type which contains root level fields.
"""
type Mutation {
auth: AuthMutation!
}
"""
The root query type which contains root level fields.
"""
type Query {
noop: Boolean!
userByUsername(username: String!): User
}
type Session {
"""
Created at
"""
createdAt: DateRFC3339!
"""
Expires at
"""
expiresAt: DateRFC3339!
"""
The session's id
"""
id: Int!
"""
Last used at
"""
lastUsedAt: DateRFC3339!
"""
The session's token
"""
token: String!
"""
The user who owns this session
"""
userId: Int!
}
type Subscription {
noop: Boolean!
}
type User {
createdAt: DateRFC3339!
email: String!
emailVerified: Boolean!
id: Int!
lastLoginAt: DateRFC3339!
username: String!
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.1"
import: [
"@key"
"@tag"
"@shareable"
"@inaccessible"
"@override"
"@external"
"@provides"
"@requires"
]
)
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT