rails-graphql 1.0.0.beta → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/ext/gql_parser.c +1 -16
  3. data/ext/gql_parser.h +21 -0
  4. data/ext/shared.c +0 -5
  5. data/ext/shared.h +6 -6
  6. data/lib/generators/graphql/channel_generator.rb +27 -0
  7. data/lib/generators/graphql/controller_generator.rb +9 -4
  8. data/lib/generators/graphql/install_generator.rb +49 -0
  9. data/lib/generators/graphql/schema_generator.rb +9 -4
  10. data/lib/generators/graphql/templates/channel.erb +7 -0
  11. data/lib/generators/graphql/templates/config.rb +97 -0
  12. data/lib/generators/graphql/templates/controller.erb +2 -0
  13. data/lib/generators/graphql/templates/schema.erb +5 -3
  14. data/lib/gql_parser.so +0 -0
  15. data/lib/rails/graphql/alternative/field_set.rb +12 -0
  16. data/lib/rails/graphql/alternative/query.rb +13 -8
  17. data/lib/rails/graphql/alternative/subscription.rb +2 -1
  18. data/lib/rails/graphql/alternative.rb +4 -0
  19. data/lib/rails/graphql/argument.rb +5 -3
  20. data/lib/rails/graphql/callback.rb +10 -8
  21. data/lib/rails/graphql/collectors/hash_collector.rb +12 -1
  22. data/lib/rails/graphql/collectors/json_collector.rb +21 -0
  23. data/lib/rails/graphql/config.rb +86 -59
  24. data/lib/rails/graphql/directive/include_directive.rb +0 -1
  25. data/lib/rails/graphql/directive/skip_directive.rb +0 -1
  26. data/lib/rails/graphql/directive/specified_by_directive.rb +24 -0
  27. data/lib/rails/graphql/directive.rb +31 -25
  28. data/lib/rails/graphql/event.rb +7 -6
  29. data/lib/rails/graphql/field/authorized_field.rb +0 -5
  30. data/lib/rails/graphql/field/input_field.rb +0 -5
  31. data/lib/rails/graphql/field/mutation_field.rb +5 -6
  32. data/lib/rails/graphql/field/output_field.rb +13 -2
  33. data/lib/rails/graphql/field/proxied_field.rb +6 -6
  34. data/lib/rails/graphql/field/resolved_field.rb +1 -1
  35. data/lib/rails/graphql/field/subscription_field.rb +35 -52
  36. data/lib/rails/graphql/field/typed_field.rb +26 -2
  37. data/lib/rails/graphql/field.rb +20 -19
  38. data/lib/rails/graphql/global_id.rb +5 -1
  39. data/lib/rails/graphql/helpers/inherited_collection/array.rb +1 -0
  40. data/lib/rails/graphql/helpers/inherited_collection/base.rb +3 -1
  41. data/lib/rails/graphql/helpers/inherited_collection/hash.rb +2 -1
  42. data/lib/rails/graphql/helpers/registerable.rb +1 -1
  43. data/lib/rails/graphql/helpers/with_arguments.rb +3 -2
  44. data/lib/rails/graphql/helpers/with_assignment.rb +5 -5
  45. data/lib/rails/graphql/helpers/with_callbacks.rb +3 -3
  46. data/lib/rails/graphql/helpers/with_description.rb +10 -8
  47. data/lib/rails/graphql/helpers/with_directives.rb +5 -1
  48. data/lib/rails/graphql/helpers/with_events.rb +1 -0
  49. data/lib/rails/graphql/helpers/with_fields.rb +30 -24
  50. data/lib/rails/graphql/helpers/with_name.rb +3 -2
  51. data/lib/rails/graphql/helpers/with_schema_fields.rb +75 -51
  52. data/lib/rails/graphql/introspection.rb +1 -1
  53. data/lib/rails/graphql/railtie.rb +3 -2
  54. data/lib/rails/graphql/railties/app/base_channel.rb +10 -0
  55. data/lib/rails/graphql/railties/app/base_controller.rb +12 -0
  56. data/lib/rails/graphql/railties/app/views/_cable.js.erb +56 -0
  57. data/lib/rails/graphql/railties/app/views/_fetch.js.erb +20 -0
  58. data/lib/rails/graphql/railties/app/views/graphiql.html.erb +101 -0
  59. data/lib/rails/graphql/railties/base_generator.rb +3 -9
  60. data/lib/rails/graphql/railties/channel.rb +8 -8
  61. data/lib/rails/graphql/railties/controller.rb +51 -26
  62. data/lib/rails/graphql/request/arguments.rb +2 -1
  63. data/lib/rails/graphql/request/backtrace.rb +31 -10
  64. data/lib/rails/graphql/request/component/field.rb +15 -8
  65. data/lib/rails/graphql/request/component/fragment.rb +13 -7
  66. data/lib/rails/graphql/request/component/operation/subscription.rb +4 -6
  67. data/lib/rails/graphql/request/component/operation.rb +12 -5
  68. data/lib/rails/graphql/request/component/spread.rb +13 -4
  69. data/lib/rails/graphql/request/component/typename.rb +1 -1
  70. data/lib/rails/graphql/request/component.rb +2 -0
  71. data/lib/rails/graphql/request/context.rb +1 -1
  72. data/lib/rails/graphql/request/event.rb +6 -2
  73. data/lib/rails/graphql/request/helpers/directives.rb +1 -0
  74. data/lib/rails/graphql/request/helpers/selection_set.rb +10 -4
  75. data/lib/rails/graphql/request/helpers/value_writers.rb +8 -5
  76. data/lib/rails/graphql/request/prepared_data.rb +3 -1
  77. data/lib/rails/graphql/request/steps/organizable.rb +1 -1
  78. data/lib/rails/graphql/request/steps/preparable.rb +1 -1
  79. data/lib/rails/graphql/request/steps/resolvable.rb +1 -1
  80. data/lib/rails/graphql/request/strategy/sequenced_strategy.rb +3 -3
  81. data/lib/rails/graphql/request/strategy.rb +18 -4
  82. data/lib/rails/graphql/request/subscription.rb +18 -16
  83. data/lib/rails/graphql/request.rb +71 -41
  84. data/lib/rails/graphql/schema.rb +39 -86
  85. data/lib/rails/graphql/shortcuts.rb +11 -5
  86. data/lib/rails/graphql/source/active_record/builders.rb +22 -24
  87. data/lib/rails/graphql/source/active_record_source.rb +96 -34
  88. data/lib/rails/graphql/source/base.rb +13 -40
  89. data/lib/rails/graphql/source/builder.rb +14 -22
  90. data/lib/rails/graphql/source/scoped_arguments.rb +10 -4
  91. data/lib/rails/graphql/source.rb +31 -38
  92. data/lib/rails/graphql/subscription/provider/action_cable.rb +10 -9
  93. data/lib/rails/graphql/subscription/provider/base.rb +6 -5
  94. data/lib/rails/graphql/subscription/store/base.rb +5 -9
  95. data/lib/rails/graphql/subscription/store/memory.rb +18 -9
  96. data/lib/rails/graphql/type/creator.rb +198 -0
  97. data/lib/rails/graphql/type/enum.rb +17 -9
  98. data/lib/rails/graphql/type/input.rb +30 -7
  99. data/lib/rails/graphql/type/interface.rb +15 -4
  100. data/lib/rails/graphql/type/object/directive_object.rb +6 -5
  101. data/lib/rails/graphql/type/object/input_value_object.rb +3 -4
  102. data/lib/rails/graphql/type/object/type_object.rb +40 -13
  103. data/lib/rails/graphql/type/object.rb +11 -6
  104. data/lib/rails/graphql/type/scalar/binary_scalar.rb +2 -0
  105. data/lib/rails/graphql/type/scalar/date_scalar.rb +2 -0
  106. data/lib/rails/graphql/type/scalar/date_time_scalar.rb +2 -0
  107. data/lib/rails/graphql/type/scalar/decimal_scalar.rb +2 -0
  108. data/lib/rails/graphql/type/scalar/json_scalar.rb +3 -1
  109. data/lib/rails/graphql/type/scalar/time_scalar.rb +3 -1
  110. data/lib/rails/graphql/type/scalar.rb +2 -2
  111. data/lib/rails/graphql/type/union.rb +7 -2
  112. data/lib/rails/graphql/type.rb +10 -2
  113. data/lib/rails/graphql/type_map.rb +20 -7
  114. data/lib/rails/graphql/uri.rb +5 -4
  115. data/lib/rails/graphql/version.rb +6 -2
  116. data/lib/rails/graphql.rb +11 -8
  117. data/test/assets/introspection-mem.txt +1 -1
  118. data/test/assets/introspection.gql +2 -0
  119. data/test/assets/mem.gql +74 -60
  120. data/test/assets/mysql.gql +69 -55
  121. data/test/assets/sqlite.gql +78 -64
  122. data/test/assets/translate.gql +50 -39
  123. data/test/config.rb +2 -1
  124. data/test/graphql/schema_test.rb +2 -31
  125. data/test/graphql/source_test.rb +1 -11
  126. data/test/graphql/type/interface_test.rb +8 -5
  127. data/test/graphql/type/object_test.rb +8 -2
  128. data/test/graphql/type_map_test.rb +13 -16
  129. data/test/integration/global_id_test.rb +4 -4
  130. data/test/integration/memory/star_wars_validation_test.rb +2 -2
  131. data/test/integration/mysql/star_wars_introspection_test.rb +1 -1
  132. data/test/integration/resolver_precedence_test.rb +1 -1
  133. data/test/integration/schemas/memory.rb +3 -4
  134. data/test/integration/sqlite/star_wars_global_id_test.rb +27 -21
  135. data/test/integration/sqlite/star_wars_introspection_test.rb +1 -1
  136. data/test/integration/translate_test.rb +26 -14
  137. metadata +22 -9
data/test/assets/mem.gql CHANGED
@@ -128,14 +128,14 @@ interface Character {
128
128
  "The id of the character"
129
129
  id: ID!
130
130
 
131
- "The name of the character"
132
- name: String
131
+ "Which movies they appear in"
132
+ appearsIn: [Episode]
133
133
 
134
134
  "The friends of the character, or an empty list if they have none"
135
135
  friends: [Character]
136
136
 
137
- "Which movies they appear in"
138
- appearsIn: [Episode]
137
+ "The name of the character"
138
+ name: String
139
139
 
140
140
  "All secrets about their past"
141
141
  secretBackstory: String
@@ -147,20 +147,20 @@ type Droid implements Character {
147
147
  "The id of the droid"
148
148
  id: ID!
149
149
 
150
- "The name of the droid"
151
- name: String
150
+ "Which movies they appear in"
151
+ appearsIn: [Episode]
152
152
 
153
153
  "The friends of the droid, or an empty list if they have none"
154
154
  friends: [Character]
155
155
 
156
- "Which movies they appear in"
157
- appearsIn: [Episode]
158
-
159
- "Construction date and the name of the designer"
160
- secretBackstory: String
156
+ "The name of the droid"
157
+ name: String
161
158
 
162
159
  "The primary function of the droid"
163
160
  primaryFunction: String
161
+
162
+ "Construction date and the name of the designer"
163
+ secretBackstory: String
164
164
  }
165
165
 
166
166
  "A humanoid creature in the Star Wars universe"
@@ -169,23 +169,23 @@ type Human implements Character {
169
169
  "The id of the human"
170
170
  id: ID!
171
171
 
172
- "The name of the human"
173
- name: String
172
+ "Which movies they appear in"
173
+ appearsIn: [Episode]
174
174
 
175
175
  "The friends of the human, or an empty list if they have none"
176
176
  friends: [Character]
177
177
 
178
- "Which movies they appear in"
179
- appearsIn: [Episode]
180
-
181
- "Where are they from and how they came to be who they are"
182
- secretBackstory: String
178
+ "A greeting phrase from this person to someone"
179
+ greeting(name: String!): String
183
180
 
184
181
  "The home planet of the human, or null if unknown"
185
182
  homePlanet: String
186
183
 
187
- "A greeting phrase from this person to someone"
188
- greeting(name: String!): String
184
+ "The name of the human"
185
+ name: String
186
+
187
+ "Where are they from and how they came to be who they are"
188
+ secretBackstory: String
189
189
  }
190
190
 
191
191
  type _Mutation {
@@ -204,6 +204,14 @@ type _Query {
204
204
 
205
205
  __type(name: String!): __Type
206
206
 
207
+ "Find a droid character"
208
+ droid(
209
+
210
+ "ID of the droid"
211
+ id: ID!
212
+
213
+ ): Droid
214
+
207
215
  "Find the hero of the whole saga"
208
216
  hero(
209
217
 
@@ -219,14 +227,6 @@ type _Query {
219
227
  id: ID!
220
228
 
221
229
  ): Human
222
-
223
- "Find a droid character"
224
- droid(
225
-
226
- "ID of the droid"
227
- id: ID!
228
-
229
- ): Droid
230
230
  }
231
231
 
232
232
  """
@@ -240,13 +240,15 @@ additional information to the executor.
240
240
  """
241
241
  # Assigned to Rails::GraphQL::Directive class
242
242
  type __Directive {
243
- name: String!
243
+ args: [__InputValue!]!
244
244
 
245
245
  description: String
246
246
 
247
+ isRepeatable: Boolean!
248
+
247
249
  locations: [__DirectiveLocation!]!
248
250
 
249
- args: [__InputValue!]!
251
+ name: String!
250
252
  }
251
253
 
252
254
  """
@@ -255,13 +257,13 @@ of values. It's a string representation, not a numeric representation,
255
257
  of a value kept as all caps (ie. ONE_VALUE).
256
258
  """
257
259
  type __EnumValue {
258
- name: String!
260
+ deprecationReason: String
259
261
 
260
262
  description: String
261
263
 
262
264
  isDeprecated: Boolean!
263
265
 
264
- deprecationReason: String
266
+ name: String!
265
267
  }
266
268
 
267
269
  """
@@ -271,34 +273,33 @@ a value of a specific type.
271
273
  """
272
274
  # Assigned to Rails::GraphQL::Field class
273
275
  type __Field {
274
- name: String!
275
-
276
- description: String
277
-
278
276
  args: [__InputValue!]!
279
277
 
280
- type: __Type!
278
+ deprecationReason: String
279
+
280
+ description: String
281
281
 
282
282
  isDeprecated: Boolean!
283
283
 
284
- deprecationReason: String
284
+ name: String!
285
+
286
+ type: __Type!
285
287
  }
286
288
 
287
289
  """
288
- Alongside with scalars and enums, input value objects allow the user
289
- to provide values to arguments on fields and directives. Different
290
- from those, input values accepts a list of keyed values, instead of
291
- a single value.
290
+ Arguments provided to Fields or Directives and the input fields of an
291
+ InputObject are represented as Input Values which describe their type
292
+ and optionally a default value.
292
293
  """
293
294
  # Assigned to Rails::GraphQL::Field::InputField class
294
295
  type __InputValue {
295
- name: String!
296
+ defaultValue: String
296
297
 
297
298
  description: String
298
299
 
299
- type: __Type!
300
+ name: String!
300
301
 
301
- defaultValue: String
302
+ type: __Type!
302
303
  }
303
304
 
304
305
  """
@@ -310,15 +311,15 @@ determines the place in the type system where those operations begin.
310
311
  """
311
312
  # Assigned to Rails::GraphQL::Schema class
312
313
  type __Schema {
313
- types: [__Type!]!
314
-
315
- queryType: __Type!
314
+ directives: [__Directive!]!
316
315
 
317
316
  mutationType: __Type
318
317
 
318
+ queryType: __Type!
319
+
319
320
  subscriptionType: __Type
320
321
 
321
- directives: [__Directive!]!
322
+ types: [__Type!]!
322
323
  }
323
324
 
324
325
  """
@@ -344,29 +345,31 @@ the schema to define exactly what data is expected.
344
345
  """
345
346
  # Assigned to Rails::GraphQL::Type class
346
347
  type __Type {
347
- kind: __TypeKind!
348
-
349
- name: String
350
-
351
348
  description: String
352
349
 
350
+ "ENUM only"
351
+ enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
352
+
353
353
  "OBJECT and INTERFACE only"
354
354
  fields(includeDeprecated: Boolean = false): [__Field!]
355
355
 
356
+ "INPUT_OBJECT only"
357
+ inputFields: [__InputValue!]
358
+
356
359
  "OBJECT only"
357
360
  interfaces: [__Type!]
358
361
 
359
- "INTERFACE and UNION only"
360
- possibleTypes: [__Type!]
361
-
362
- "ENUM only"
363
- enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
362
+ kind: __TypeKind!
364
363
 
365
- "INPUT_OBJECT only"
366
- inputFields: [__InputValue!]
364
+ name: String
367
365
 
368
366
  "NON_NULL and LIST only"
369
367
  ofType: __Type
368
+
369
+ "INTERFACE and UNION only"
370
+ possibleTypes: [__Type!]
371
+
372
+ specifiedByURL: String
370
373
  }
371
374
 
372
375
  """
@@ -399,3 +402,14 @@ directive @skip(
399
402
  if: Boolean!
400
403
 
401
404
  ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
405
+
406
+ """
407
+ A built-in directive used within the type system definition language to provide
408
+ a scalar specification URL for specifying the behavior of custom scalar types.
409
+ """
410
+ directive @specifiedBy(
411
+
412
+ "Point to a human-readable specification of the data format."
413
+ url: String!
414
+
415
+ ) on SCALAR
@@ -16,22 +16,22 @@ scalar Bigint
16
16
  The Binary scalar type represents a Base64 string.
17
17
  Normally used to share files and uploads.
18
18
  """
19
- scalar Binary
19
+ scalar Binary @specifiedBy(url: "https://www.rfc-editor.org/rfc/rfc3548")
20
20
 
21
21
  "The Boolean scalar type represents true or false."
22
22
  scalar Boolean
23
23
 
24
24
  "The Date scalar type represents a ISO 8601 string value."
25
- scalar Date
25
+ scalar Date @specifiedBy(url: "https://en.wikipedia.org/wiki/ISO_8601")
26
26
 
27
27
  "The DateTime scalar type represents a ISO 8601 string value."
28
- scalar DateTime
28
+ scalar DateTime @specifiedBy(url: "https://en.wikipedia.org/wiki/ISO_8601")
29
29
 
30
30
  """
31
31
  The Decimal scalar type represents signed fractional values with extra precision.
32
32
  The values are exchange as string.
33
33
  """
34
- scalar Decimal
34
+ scalar Decimal @specifiedBy(url: "https://en.wikipedia.org/wiki/IEEE_754-2008_revision")
35
35
 
36
36
  "The Float scalar type represents signed double-precision fractional values."
37
37
  scalar Float
@@ -47,9 +47,9 @@ scalar Int
47
47
 
48
48
  """
49
49
  The JSON scalar type represents an unstructured JSON data
50
- with all its available kyes and values.
50
+ with all its available keys and values.
51
51
  """
52
- scalar JSON
52
+ scalar JSON @specifiedBy(url: "https://www.rfc-editor.org/rfc/rfc8259")
53
53
 
54
54
  """
55
55
  The String scalar type represents textual data, represented as UTF-8 character
@@ -59,9 +59,9 @@ scalar String
59
59
 
60
60
  """
61
61
  The Time scalar type that represents a distance in time using hours,
62
- minutes, seconds, and miliseconds.
62
+ minutes, seconds, and milliseconds.
63
63
  """
64
- scalar Time
64
+ scalar Time @specifiedBy(url: "https://en.wikipedia.org/wiki/ISO_8601")
65
65
 
66
66
  "The valid locations that a directive may be placed."
67
67
  enum __DirectiveLocation {
@@ -154,56 +154,56 @@ enum __TypeKind {
154
154
  input JediInput {
155
155
  id: ID
156
156
 
157
+ _delete: Boolean = false
158
+
157
159
  jediTypeId: ID
158
160
 
159
161
  name: String
160
-
161
- _delete: Boolean = false
162
162
  }
163
163
 
164
164
  # Assigned to JediType class
165
165
  input JediTypeInput {
166
166
  id: ID
167
167
 
168
- name: String
169
-
170
168
  _delete: Boolean = false
171
169
 
172
170
  jediAttributes: [JediInput!]
171
+
172
+ name: String
173
173
  }
174
174
 
175
175
  # Assigned to Jedi class
176
176
  type Jedi {
177
177
  id: ID!
178
178
 
179
+ jediType: JediType
180
+
179
181
  jediTypeId: ID
180
182
 
181
183
  name: String
182
-
183
- jediType: JediType
184
184
  }
185
185
 
186
186
  # Assigned to JediType class
187
187
  type JediType {
188
188
  id: ID!
189
189
 
190
- name: String
191
-
192
190
  jedi: [Jedi!]!
191
+
192
+ name: String
193
193
  }
194
194
 
195
195
  type _Mutation {
196
+ createJedi(jedi: JediInput!): Jedi!
197
+
196
198
  createJediType(jediType: JediTypeInput!): JediType!
197
199
 
198
- updateJediType(id: ID!, jediType: JediTypeInput!): JediType!
200
+ deleteJedi(id: ID!): Boolean!
199
201
 
200
202
  deleteJediType(id: ID!): Boolean!
201
203
 
202
- createJedi(jedi: JediInput!): Jedi!
203
-
204
204
  updateJedi(id: ID!, jedi: JediInput!): Jedi!
205
205
 
206
- deleteJedi(id: ID!): Boolean!
206
+ updateJediType(id: ID!, jediType: JediTypeInput!): JediType!
207
207
  }
208
208
 
209
209
  type _Query {
@@ -211,13 +211,13 @@ type _Query {
211
211
 
212
212
  __type(name: String!): __Type
213
213
 
214
- jediTypes(order: String): [JediType!]!
214
+ jedi(id: ID!): Jedi!
215
215
 
216
216
  jediType(id: ID!): JediType!
217
217
 
218
- jedis: [Jedi!]!
218
+ jediTypes(order: String): [JediType!]!
219
219
 
220
- jedi(id: ID!): Jedi!
220
+ jedis: [Jedi!]!
221
221
  }
222
222
 
223
223
  """
@@ -231,13 +231,15 @@ additional information to the executor.
231
231
  """
232
232
  # Assigned to Rails::GraphQL::Directive class
233
233
  type __Directive {
234
- name: String!
234
+ args: [__InputValue!]!
235
235
 
236
236
  description: String
237
237
 
238
+ isRepeatable: Boolean!
239
+
238
240
  locations: [__DirectiveLocation!]!
239
241
 
240
- args: [__InputValue!]!
242
+ name: String!
241
243
  }
242
244
 
243
245
  """
@@ -246,13 +248,13 @@ of values. It's a string representation, not a numeric representation,
246
248
  of a value kept as all caps (ie. ONE_VALUE).
247
249
  """
248
250
  type __EnumValue {
249
- name: String!
251
+ deprecationReason: String
250
252
 
251
253
  description: String
252
254
 
253
255
  isDeprecated: Boolean!
254
256
 
255
- deprecationReason: String
257
+ name: String!
256
258
  }
257
259
 
258
260
  """
@@ -262,34 +264,33 @@ a value of a specific type.
262
264
  """
263
265
  # Assigned to Rails::GraphQL::Field class
264
266
  type __Field {
265
- name: String!
266
-
267
- description: String
268
-
269
267
  args: [__InputValue!]!
270
268
 
271
- type: __Type!
269
+ deprecationReason: String
270
+
271
+ description: String
272
272
 
273
273
  isDeprecated: Boolean!
274
274
 
275
- deprecationReason: String
275
+ name: String!
276
+
277
+ type: __Type!
276
278
  }
277
279
 
278
280
  """
279
- Alongside with scalars and enums, input value objects allow the user
280
- to provide values to arguments on fields and directives. Different
281
- from those, input values accepts a list of keyed values, instead of
282
- a single value.
281
+ Arguments provided to Fields or Directives and the input fields of an
282
+ InputObject are represented as Input Values which describe their type
283
+ and optionally a default value.
283
284
  """
284
285
  # Assigned to Rails::GraphQL::Field::InputField class
285
286
  type __InputValue {
286
- name: String!
287
+ defaultValue: String
287
288
 
288
289
  description: String
289
290
 
290
- type: __Type!
291
+ name: String!
291
292
 
292
- defaultValue: String
293
+ type: __Type!
293
294
  }
294
295
 
295
296
  """
@@ -301,15 +302,15 @@ determines the place in the type system where those operations begin.
301
302
  """
302
303
  # Assigned to Rails::GraphQL::Schema class
303
304
  type __Schema {
304
- types: [__Type!]!
305
-
306
- queryType: __Type!
305
+ directives: [__Directive!]!
307
306
 
308
307
  mutationType: __Type
309
308
 
309
+ queryType: __Type!
310
+
310
311
  subscriptionType: __Type
311
312
 
312
- directives: [__Directive!]!
313
+ types: [__Type!]!
313
314
  }
314
315
 
315
316
  """
@@ -335,29 +336,31 @@ the schema to define exactly what data is expected.
335
336
  """
336
337
  # Assigned to Rails::GraphQL::Type class
337
338
  type __Type {
338
- kind: __TypeKind!
339
-
340
- name: String
341
-
342
339
  description: String
343
340
 
341
+ "ENUM only"
342
+ enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
343
+
344
344
  "OBJECT and INTERFACE only"
345
345
  fields(includeDeprecated: Boolean = false): [__Field!]
346
346
 
347
+ "INPUT_OBJECT only"
348
+ inputFields: [__InputValue!]
349
+
347
350
  "OBJECT only"
348
351
  interfaces: [__Type!]
349
352
 
350
- "INTERFACE and UNION only"
351
- possibleTypes: [__Type!]
352
-
353
- "ENUM only"
354
- enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
353
+ kind: __TypeKind!
355
354
 
356
- "INPUT_OBJECT only"
357
- inputFields: [__InputValue!]
355
+ name: String
358
356
 
359
357
  "NON_NULL and LIST only"
360
358
  ofType: __Type
359
+
360
+ "INTERFACE and UNION only"
361
+ possibleTypes: [__Type!]
362
+
363
+ specifiedByURL: String
361
364
  }
362
365
 
363
366
  """
@@ -390,3 +393,14 @@ directive @skip(
390
393
  if: Boolean!
391
394
 
392
395
  ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
396
+
397
+ """
398
+ A built-in directive used within the type system definition language to provide
399
+ a scalar specification URL for specifying the behavior of custom scalar types.
400
+ """
401
+ directive @specifiedBy(
402
+
403
+ "Point to a human-readable specification of the data format."
404
+ url: String!
405
+
406
+ ) on SCALAR