-
Notifications
You must be signed in to change notification settings - Fork 7
/
schema.graphql
226 lines (220 loc) · 5.51 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
directive @prefixedID(prefix: String!) on OBJECT
"""Input information to create a location."""
input CreateLocationInput {
"""The name for the location."""
name: String!
"""An optional description for the location."""
description: String
"""The ID of the resource owner for the location."""
ownerID: ID!
}
"""
Define a Relay Cursor type:
https://relay.dev/graphql/connections.htm#sec-Cursor
"""
scalar Cursor
"""A valid JSON string."""
scalar JSON
type Location implements Node & MetadataNode @key(fields: "id") @prefixedID(prefix: "lctnloc") {
"""ID for the location."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The name for the location."""
name: String!
"""An optional description for the location."""
description: String
owner: ResourceOwner!
}
"""A connection to a list of items."""
type LocationConnection {
"""A list of edges."""
edges: [LocationEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""Return response from locationCreate"""
type LocationCreatePayload {
"""The created annotation namespace."""
location: Location!
}
"""Return response from locationDelete"""
type LocationDeletePayload {
"""The ID of the deleted annotation namespace."""
deletedID: ID!
}
"""An edge in a connection."""
type LocationEdge {
"""The item at the end of the edge."""
node: Location
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for Location connections"""
input LocationOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order Locations."""
field: LocationOrderField!
}
"""Properties by which Location connections can be ordered."""
enum LocationOrderField {
CREATED_AT
UPDATED_AT
NAME
}
"""Return response from locationUpdate"""
type LocationUpdatePayload {
"""The updated annotation namespace."""
location: Location!
}
"""
LocationWhereInput is used for filtering Location objects.
Input was generated by ent.
"""
input LocationWhereInput {
not: LocationWhereInput
and: [LocationWhereInput!]
or: [LocationWhereInput!]
"""id field predicates"""
id: ID
idNEQ: ID
idIn: [ID!]
idNotIn: [ID!]
idGT: ID
idGTE: ID
idLT: ID
idLTE: ID
"""created_at field predicates"""
createdAt: Time
createdAtNEQ: Time
createdAtIn: [Time!]
createdAtNotIn: [Time!]
createdAtGT: Time
createdAtGTE: Time
createdAtLT: Time
createdAtLTE: Time
"""updated_at field predicates"""
updatedAt: Time
updatedAtNEQ: Time
updatedAtIn: [Time!]
updatedAtNotIn: [Time!]
updatedAtGT: Time
updatedAtGTE: Time
updatedAtLT: Time
updatedAtLTE: Time
"""name field predicates"""
name: String
nameNEQ: String
nameIn: [String!]
nameNotIn: [String!]
nameGT: String
nameGTE: String
nameLT: String
nameLTE: String
nameContains: String
nameHasPrefix: String
nameHasSuffix: String
nameEqualFold: String
nameContainsFold: String
}
interface MetadataNode {
id: ID!
}
type Mutation {
"""Create a location."""
locationCreate(input: CreateLocationInput!): LocationCreatePayload!
"""Delete a location."""
locationDelete(
"""The ID of the annotation namespace to be deleted."""
id: ID!
): LocationDeletePayload!
"""Update a location."""
locationUpdate(id: ID!, input: UpdateLocationInput!): LocationUpdatePayload!
}
"""
An object with an ID.
Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm)
"""
interface Node {
"""The id of the object."""
id: ID!
}
"""Possible directions in which to order a list of items when provided an `orderBy` argument."""
enum OrderDirection {
"""Specifies an ascending order for a given `orderBy` argument."""
ASC
"""Specifies a descending order for a given `orderBy` argument."""
DESC
}
"""
Information about pagination in a connection.
https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo
"""
type PageInfo @shareable {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: Cursor
"""When paginating forwards, the cursor to continue."""
endCursor: Cursor
}
type Query {
"""Lookup a location by id."""
location(
"""The ID of the location."""
id: ID!
): Location!
_entities(representations: [_Any!]!): [_Entity]!
_service: _Service!
}
type ResourceOwner @key(fields: "id") @interfaceObject {
id: ID!
locations(
"""Returns the elements in the list that come after the specified cursor."""
after: Cursor
"""Returns the first _n_ elements from the list."""
first: Int
"""Returns the elements in the list that come before the specified cursor."""
before: Cursor
"""Returns the last _n_ elements from the list."""
last: Int
"""Ordering options for Locations returned from the connection."""
orderBy: LocationOrder
"""Filtering options for Locations returned from the connection."""
where: LocationWhereInput
): LocationConnection!
}
"""The builtin Time type"""
scalar Time
"""Input information to update a location."""
input UpdateLocationInput {
"""The name for the location."""
name: String
"""An optional description for the location."""
description: String
clearDescription: Boolean
}
scalar _Any
union _Entity = Location | ResourceOwner
type _Service {
sdl: String
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.3"
import: [
"@key",
"@interfaceObject",
"@shareable",
"@inaccessible",
"@override",
"@provides",
"@requires",
"@tag"
]
)