-
Notifications
You must be signed in to change notification settings - Fork 0
/
testschema.gql
107 lines (96 loc) · 1.66 KB
/
testschema.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
"""
Account
"""
type Account {
createdAt: ISO8601DateTime!
data: String!
devices: [Device!]!
id: ID!
pendingRequests: [Request!]!
truentityId: String!
updatedAt: ISO8601DateTime!
user: User!
}
"""
Autogenerated return type of AccountLogin
"""
type AccountLoginPayload {
accessToken: String!
account: Account!
refreshToken: String!
}
"""
Autogenerated return type of AccountSignup
"""
type AccountSignupPayload {
accessToken: String!
account: Account!
refreshToken: String!
}
"""
Device
"""
type Device {
client: String!
clientVersion: String!
createdAt: ISO8601DateTime!
expiresAt: NonNegativeInt!
id: ID!
ip: String
lastIssued: String!
lastIssuedAt: ISO8601DateTime!
updatedAt: ISO8601DateTime!
user: User!
userAgent: String!
}
"""
A properly formatted email address
"""
scalar Email
"""
An ISO 8601-encoded datetime
"""
scalar ISO8601DateTime
enum LocaleEnum {
US_ENGLISH
}
"""
The mutation root of this schema
"""
type Mutation {
"""
Obtain access tokens with account credentials
"""
accountLogin(email: Email!, fcmToken: String!, password: String!): AccountLoginPayload
"""
Sign up a new account
"""
accountSignup(email: Email!, fcmToken: String, firstName: String!, lastName: String!, password: String!): AccountSignupPayload
}
"""
An Int with a value >= 0
"""
scalar NonNegativeInt
"""
The query root of this schema
"""
type Query {
"""
Get current account
"""
currentAccount: Account!
}
"""
User
"""
type User {
createdAt: ISO8601DateTime!
devices: [Device!]!
email: Email!
firstName: String
id: ID!
lastName: String
locale: LocaleEnum!
passwordStale: Boolean
updatedAt: ISO8601DateTime!
}