-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.graphql
239 lines (233 loc) · 6.31 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
227
228
229
230
231
232
233
234
235
236
237
238
239
directive @prefixedID(prefix: String!) on OBJECT
"""Create a new ResourceProvider."""
input CreateResourceProviderInput {
"""The name of the resource provider."""
name: String!
"""The description of the resource provider."""
description: String
"""The ID for the owner for this resource provider."""
ownerID: ID!
}
"""
Define a Relay Cursor type:
https://relay.dev/graphql/connections.htm#sec-Cursor
"""
scalar Cursor
"""A valid JSON string."""
scalar JSON
type Mutation {
"""Create a resource provider."""
resourceProviderCreate(input: CreateResourceProviderInput!): ResourceProviderCreatePayload!
"""Update a resource provider."""
resourceProviderUpdate(id: ID!, input: UpdateResourceProviderInput!): ResourceProviderUpdatePayload!
"""Delete a resource provider."""
resourceProviderDelete(id: ID!): ResourceProviderDeletePayload!
}
"""
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 resource provider by ID."""
resourceProvider(
"""The resource provider ID."""
id: ID!
): ResourceProvider!
_entities(representations: [_Any!]!): [_Entity]!
_service: _Service!
}
type ResourceOwner @key(fields: "id") @interfaceObject {
id: ID!
resourceProvider(
"""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 ResourceProvider returned from the connection."""
orderBy: ResourceProviderOrder
"""Filtering options for ResourceProvider returned from the connection."""
where: ResourceProviderWhereInput
): ResourceProviderConnection!
}
type ResourceProvider implements Node @key(fields: "id") @prefixedID(prefix: "resopro") {
"""The ID of the resource provider."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The name of the resource provider."""
name: String!
"""The description of the resource provider."""
description: String
"""The owner of the resourceProvider."""
owner: ResourceOwner!
}
"""A connection to a list of items."""
type ResourceProviderConnection {
"""A list of edges."""
edges: [ResourceProviderEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""Return response from resourceProviderCreate"""
type ResourceProviderCreatePayload {
"""The created resource provider."""
resourceProvider: ResourceProvider!
}
"""Return response from resourceProviderDelete"""
type ResourceProviderDeletePayload {
"""The ID of the deleted resource provider."""
deletedID: ID!
}
"""An edge in a connection."""
type ResourceProviderEdge {
"""The item at the end of the edge."""
node: ResourceProvider
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for ResourceProvider connections"""
input ResourceProviderOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order ResourceProviders."""
field: ResourceProviderOrderField!
}
"""Properties by which ResourceProvider connections can be ordered."""
enum ResourceProviderOrderField {
ID
CREATED_AT
UPDATED_AT
NAME
DESCRIPTION
}
"""Return response from resourceProviderUpdate"""
type ResourceProviderUpdatePayload {
"""The updated resource provider."""
resourceProvider: ResourceProvider!
}
"""
ResourceProviderWhereInput is used for filtering ResourceProvider objects.
Input was generated by ent.
"""
input ResourceProviderWhereInput {
not: ResourceProviderWhereInput
and: [ResourceProviderWhereInput!]
or: [ResourceProviderWhereInput!]
"""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
"""description field predicates"""
description: String
descriptionNEQ: String
descriptionIn: [String!]
descriptionNotIn: [String!]
descriptionGT: String
descriptionGTE: String
descriptionLT: String
descriptionLTE: String
descriptionContains: String
descriptionHasPrefix: String
descriptionHasSuffix: String
descriptionIsNil: Boolean
descriptionNotNil: Boolean
descriptionEqualFold: String
descriptionContainsFold: String
}
"""The builtin Time type"""
scalar Time
"""Update an existing ResourceProvider."""
input UpdateResourceProviderInput {
"""The name of the resource provider."""
name: String
"""The description of the resource provider."""
description: String
clearDescription: Boolean
}
scalar _Any
union _Entity = ResourceOwner | ResourceProvider
type _Service {
sdl: String
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.3"
import: [
"@key",
"@interfaceObject",
"@shareable",
"@inaccessible",
"@override",
"@provides",
"@requires",
"@tag"
]
)