graphlient 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08b4986ba4bf7847c4b14edf75bd14a43726a0f642b4611653ad32e526b51d00'
4
- data.tar.gz: e4cfa8a24ea6cf149920a5c4a7068dea0abb0af1c0fce9592ccee3945ed5d794
3
+ metadata.gz: c049e978a0c48e45fe84d49470bc890ae3b6ea86b86aab8158322616c62968dd
4
+ data.tar.gz: c7307c2b5c6ac6ac2b55ee4d416bbfffee1e29ed0826916254077add10370ee9
5
5
  SHA512:
6
- metadata.gz: 6b98ef7953ca9d6aa06639bbac461acce395e473aa87ccb8764b389107e7932e96488e2b8c37bb8fae7c4c60c25c634c340a24ebb8cd097f31f0b7856f0d7cdd
7
- data.tar.gz: 583dd907e0a4d04a2f0c885c9403126453956605ad0d05da495d94f34684411435b28a4dcc25a28f2205a08442c21aa239ecd74866ee55ff8f6cb55b568734ad
6
+ metadata.gz: 627d0d04d5ecea5e4c33ea0e59b15ac46fc458f76f179ac624d3519036865ad29267f629b1b3fda7592a50c846ea2cf06cc58a8f188a06caee44715268c18d07
7
+ data.tar.gz: 9742adef6879fbd08b00350674dced4b4886e476b45388d6d1a1afaaebba440153632e878649ff68beb223b158f365dd180b6db76e8463a13dbbeb4cdf8aa88d
@@ -1,3 +1,9 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+
4
+ Lint/SplatKeywordArguments:
5
+ Enabled: false
6
+
1
7
  Style/FrozenStringLiteralComment:
2
8
  Enabled: false
3
9
 
@@ -3,9 +3,9 @@ language: ruby
3
3
  cache: bundler
4
4
 
5
5
  rvm:
6
- - 2.3.6
7
- - 2.4.3
8
6
  - 2.5.0
7
+ - 2.7.2
8
+ - 3.0.0
9
9
  - ruby-head
10
10
  - jruby-9.1.16.0
11
11
  - jruby-head
@@ -15,7 +15,7 @@ before_install:
15
15
 
16
16
  matrix:
17
17
  include:
18
- - rvm: 2.3.6
18
+ - rvm: 2.7.2
19
19
  script:
20
20
  - bundle exec danger
21
21
  allow_failures:
@@ -1,12 +1,20 @@
1
- ### 0.5.0 (Next)
1
+ ### 0.6.0 (Next)
2
+ * Your contribution here.
3
+
4
+ ### 0.5.0 (12/28/2020)
5
+
6
+ * [#81](https://github.com/ashkan18/graphlient/pull/81): Make graphlient run on ruby 3.0 - [@Burgestrand](https://github.com/Burgestrand).
7
+ * [#79](https://github.com/ashkan18/graphlient/pull/79): Added client testing docs - [@GabrielDzul](https://github.com/GabrielDzul).
8
+
9
+ ### 0.4.0 (5/22/2020)
2
10
 
3
- ### 0.4.0
4
11
  * [#72](https://github.com/ashkan18/graphlient/pull/72): Add http_options - [@neroleung](https://github.com/neroleung).
5
12
  * [#71](https://github.com/ashkan18/graphlient/issues/70): Add `Graphlient::Errors::TimeoutError` - [@BenDrozdoff](https://github.com/BenDrozdoff).
6
13
  * [#75](https://github.com/ashkan18/graphlient/pull/75): Support Faraday 1.x - [@jfhinchcliffe](https://github.com/jfhinchcliffe).
7
- * Your contribution here.
14
+ * [#78](https://github.com/ashkan18/graphlient/pull/78): Add description of timeout values - [@sap1enza](https://github.com/sap1enza).
15
+
16
+ ### 0.3.7 (11/14/2019)
8
17
 
9
- ### 0.3.7 (14/11/2019)
10
18
  * [#68](https://github.com/ashkan18/graphlient/pull/68): Add `Graphlient::Errors::ConnectionFailedError` - [@neroleung](https://github.com/neroleung).
11
19
 
12
20
  ### 0.3.6 (07/23/2019)
data/Gemfile CHANGED
@@ -15,7 +15,7 @@ group :development do
15
15
  end
16
16
 
17
17
  group :test do
18
- gem 'graphql', '~> 1.9.7'
18
+ gem 'graphql', '~> 1.9'
19
19
  gem 'graphql-errors'
20
20
  gem 'rack-parser'
21
21
  gem 'rack-test'
data/README.md CHANGED
@@ -29,6 +29,11 @@ client = Graphlient::Client.new('https://test-graphql.biz/graphql',
29
29
  )
30
30
  ```
31
31
 
32
+ | http_options | default | type |
33
+ |---------------|---------|---------|
34
+ | read_timeout | nil | seconds |
35
+ | write_timeout | nil | seconds |
36
+
32
37
  The schema is available automatically via `.schema`.
33
38
 
34
39
  ```ruby
@@ -384,6 +389,49 @@ describe App do
384
389
  end
385
390
  ```
386
391
 
392
+ In order to stub the response to actual queries, [dump the schema into a JSON file](#schema-storing-and-loading-on-disk) and specify it via schema_path as follows.
393
+
394
+ ```ruby
395
+ describe App do
396
+ let(:url) { 'http://graph.biz/graphql' }
397
+ let(:client) { Graphlient::Client.new(url, schema_path: 'spec/support/fixtures/invoice_api.json') }
398
+ let(:query) do
399
+ <<~GRAPHQL
400
+ query{
401
+ invoice(id: 42) {
402
+ id
403
+ feeInCents
404
+ }
405
+ }
406
+ GRAPHQL
407
+ end
408
+ let(:json_response) do
409
+ {
410
+ 'data' => {
411
+ 'invoice' => {
412
+ 'id' => '42',
413
+ 'feeInCents' => 2000
414
+ }
415
+ }
416
+ }.to_json
417
+ end
418
+
419
+ before do
420
+ stub_request(:post, url).to_return(
421
+ status: 200,
422
+ body: json_response
423
+ )
424
+ end
425
+
426
+ it 'returns invoice fees' do
427
+ response = client.query(query)
428
+ expect(response.data).to be_truthy
429
+ expect(response.data.invoice.id).to eq('42')
430
+ expect(response.data.invoice.fee_in_cents).to eq(2000)
431
+ end
432
+ end
433
+ ```
434
+
387
435
  ## License
388
436
 
389
437
  MIT License, see [LICENSE](LICENSE)
@@ -22,7 +22,7 @@ module Graphlient
22
22
  query_params[:context] = @options if @options
23
23
  query_params[:variables] = variables if variables
24
24
  query = client.parse(query) if query.is_a?(String)
25
- rc = client.query(query, query_params)
25
+ rc = client.query(query, **query_params)
26
26
  raise Graphlient::Errors::GraphQLError, rc if rc.errors.any?
27
27
  # see https://github.com/github/graphql-client/pull/132
28
28
  # see https://github.com/exAspArk/graphql-errors/issues/2
@@ -1,3 +1,3 @@
1
1
  module Graphlient
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
@@ -104,7 +104,9 @@ describe Graphlient::Adapters::HTTP::FaradayAdapter do
104
104
  stub_request(:post, url).to_raise(Faraday::TimeoutError.new(Net::ReadTimeout.new(error_message)))
105
105
  end
106
106
  it 'raises a Graphlient Timeout' do
107
- expect { client.schema }.to raise_error(Graphlient::Errors::TimeoutError, error_message)
107
+ expect { client.schema }.to raise_error(Graphlient::Errors::TimeoutError) { |error|
108
+ expect(error.message).to include(error_message)
109
+ }
108
110
  end
109
111
  end
110
112
  end
@@ -91,7 +91,7 @@ describe Graphlient::Client do
91
91
  expect do
92
92
  client.execute(query, id: '42')
93
93
  end.to raise_error Graphlient::Errors::GraphQLError do |e|
94
- expect(e.to_s).to eq 'Variable id of type Int was provided invalid value'
94
+ expect(e.to_s).to eq 'Variable $id of type Int was provided invalid value'
95
95
  end
96
96
  end
97
97
 
@@ -223,7 +223,7 @@ describe Graphlient::Client do
223
223
  end
224
224
  end
225
225
  end.to raise_error Graphlient::Errors::GraphQLError,
226
- 'Variable input of type CreateInvoiceInput! was provided invalid value'
226
+ 'Variable $input of type CreateInvoiceInput! was provided invalid value'
227
227
  end
228
228
 
229
229
  it 'returns a response from a query' do
@@ -272,7 +272,7 @@ describe Graphlient::Client do
272
272
  end
273
273
  end
274
274
  end.to raise_error Graphlient::Errors::GraphQLError,
275
- 'Variable input of type CreateInvoiceInput! was provided invalid value for feeInCents (Expected value to not be null)'
275
+ 'Variable $input of type CreateInvoiceInput! was provided invalid value for feeInCents (Expected value to not be null)'
276
276
  end
277
277
  end
278
278
  end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'App' do
4
+ let(:url) { 'http://graph.biz/graphql' }
5
+ let(:client) { Graphlient::Client.new(url, schema_path: 'spec/support/fixtures/invoice_api.json') }
6
+ let(:query) do
7
+ <<~GRAPHQL
8
+ query{
9
+ invoice(id: 42) {
10
+ id
11
+ feeInCents
12
+ }
13
+ }
14
+ GRAPHQL
15
+ end
16
+ let(:json_response) do
17
+ {
18
+ 'data' => {
19
+ 'invoice' => {
20
+ 'id' => '42',
21
+ 'feeInCents' => 2000
22
+ }
23
+ }
24
+ }.to_json
25
+ end
26
+
27
+ before do
28
+ stub_request(:post, url).to_return(
29
+ status: 200,
30
+ body: json_response
31
+ )
32
+ end
33
+
34
+ it 'returns invoice fees' do
35
+ response = client.query(query)
36
+ expect(response.data).to be_truthy
37
+ expect(response.data.invoice.id).to eq('42')
38
+ expect(response.data.invoice.fee_in_cents).to eq(2000)
39
+ end
40
+ end
@@ -0,0 +1,1289 @@
1
+ {
2
+ "data": {
3
+ "__schema": {
4
+ "queryType": {
5
+ "name": "Query"
6
+ },
7
+ "mutationType": {
8
+ "name": "Mutation"
9
+ },
10
+ "subscriptionType": null,
11
+ "types": [
12
+ {
13
+ "kind": "SCALAR",
14
+ "name": "Boolean",
15
+ "description": "Represents `true` or `false` values.",
16
+ "fields": null,
17
+ "inputFields": null,
18
+ "interfaces": null,
19
+ "enumValues": null,
20
+ "possibleTypes": null
21
+ },
22
+ {
23
+ "kind": "INPUT_OBJECT",
24
+ "name": "CreateInvoiceInput",
25
+ "description": "Autogenerated input type of CreateInvoice",
26
+ "fields": null,
27
+ "inputFields": [
28
+ {
29
+ "name": "feeInCents",
30
+ "description": null,
31
+ "type": {
32
+ "kind": "NON_NULL",
33
+ "name": null,
34
+ "ofType": {
35
+ "kind": "SCALAR",
36
+ "name": "Int",
37
+ "ofType": null
38
+ }
39
+ },
40
+ "defaultValue": null
41
+ },
42
+ {
43
+ "name": "clientMutationId",
44
+ "description": "A unique identifier for the client performing the mutation.",
45
+ "type": {
46
+ "kind": "SCALAR",
47
+ "name": "String",
48
+ "ofType": null
49
+ },
50
+ "defaultValue": null
51
+ }
52
+ ],
53
+ "interfaces": null,
54
+ "enumValues": null,
55
+ "possibleTypes": null
56
+ },
57
+ {
58
+ "kind": "OBJECT",
59
+ "name": "CreateInvoicePayload",
60
+ "description": "Autogenerated return type of CreateInvoice",
61
+ "fields": [
62
+ {
63
+ "name": "clientMutationId",
64
+ "description": "A unique identifier for the client performing the mutation.",
65
+ "args": [
66
+
67
+ ],
68
+ "type": {
69
+ "kind": "SCALAR",
70
+ "name": "String",
71
+ "ofType": null
72
+ },
73
+ "isDeprecated": false,
74
+ "deprecationReason": null
75
+ },
76
+ {
77
+ "name": "errors",
78
+ "description": null,
79
+ "args": [
80
+
81
+ ],
82
+ "type": {
83
+ "kind": "LIST",
84
+ "name": null,
85
+ "ofType": {
86
+ "kind": "NON_NULL",
87
+ "name": null,
88
+ "ofType": {
89
+ "kind": "SCALAR",
90
+ "name": "String",
91
+ "ofType": null
92
+ }
93
+ }
94
+ },
95
+ "isDeprecated": false,
96
+ "deprecationReason": null
97
+ },
98
+ {
99
+ "name": "invoice",
100
+ "description": null,
101
+ "args": [
102
+
103
+ ],
104
+ "type": {
105
+ "kind": "OBJECT",
106
+ "name": "Invoice",
107
+ "ofType": null
108
+ },
109
+ "isDeprecated": false,
110
+ "deprecationReason": null
111
+ }
112
+ ],
113
+ "inputFields": null,
114
+ "interfaces": [
115
+
116
+ ],
117
+ "enumValues": null,
118
+ "possibleTypes": null
119
+ },
120
+ {
121
+ "kind": "SCALAR",
122
+ "name": "ID",
123
+ "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
124
+ "fields": null,
125
+ "inputFields": null,
126
+ "interfaces": null,
127
+ "enumValues": null,
128
+ "possibleTypes": null
129
+ },
130
+ {
131
+ "kind": "SCALAR",
132
+ "name": "Int",
133
+ "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
134
+ "fields": null,
135
+ "inputFields": null,
136
+ "interfaces": null,
137
+ "enumValues": null,
138
+ "possibleTypes": null
139
+ },
140
+ {
141
+ "kind": "OBJECT",
142
+ "name": "Invoice",
143
+ "description": "An Invoice",
144
+ "fields": [
145
+ {
146
+ "name": "feeInCents",
147
+ "description": null,
148
+ "args": [
149
+
150
+ ],
151
+ "type": {
152
+ "kind": "SCALAR",
153
+ "name": "Int",
154
+ "ofType": null
155
+ },
156
+ "isDeprecated": false,
157
+ "deprecationReason": null
158
+ },
159
+ {
160
+ "name": "id",
161
+ "description": null,
162
+ "args": [
163
+
164
+ ],
165
+ "type": {
166
+ "kind": "NON_NULL",
167
+ "name": null,
168
+ "ofType": {
169
+ "kind": "SCALAR",
170
+ "name": "ID",
171
+ "ofType": null
172
+ }
173
+ },
174
+ "isDeprecated": false,
175
+ "deprecationReason": null
176
+ }
177
+ ],
178
+ "inputFields": null,
179
+ "interfaces": [
180
+
181
+ ],
182
+ "enumValues": null,
183
+ "possibleTypes": null
184
+ },
185
+ {
186
+ "kind": "OBJECT",
187
+ "name": "Mutation",
188
+ "description": null,
189
+ "fields": [
190
+ {
191
+ "name": "createInvoice",
192
+ "description": null,
193
+ "args": [
194
+ {
195
+ "name": "input",
196
+ "description": null,
197
+ "type": {
198
+ "kind": "NON_NULL",
199
+ "name": null,
200
+ "ofType": {
201
+ "kind": "INPUT_OBJECT",
202
+ "name": "CreateInvoiceInput",
203
+ "ofType": null
204
+ }
205
+ },
206
+ "defaultValue": null
207
+ }
208
+ ],
209
+ "type": {
210
+ "kind": "OBJECT",
211
+ "name": "CreateInvoicePayload",
212
+ "ofType": null
213
+ },
214
+ "isDeprecated": false,
215
+ "deprecationReason": null
216
+ }
217
+ ],
218
+ "inputFields": null,
219
+ "interfaces": [
220
+
221
+ ],
222
+ "enumValues": null,
223
+ "possibleTypes": null
224
+ },
225
+ {
226
+ "kind": "OBJECT",
227
+ "name": "Query",
228
+ "description": null,
229
+ "fields": [
230
+ {
231
+ "name": "invoice",
232
+ "description": "Find invoice",
233
+ "args": [
234
+ {
235
+ "name": "id",
236
+ "description": null,
237
+ "type": {
238
+ "kind": "SCALAR",
239
+ "name": "Int",
240
+ "ofType": null
241
+ },
242
+ "defaultValue": null
243
+ }
244
+ ],
245
+ "type": {
246
+ "kind": "OBJECT",
247
+ "name": "Invoice",
248
+ "ofType": null
249
+ },
250
+ "isDeprecated": false,
251
+ "deprecationReason": null
252
+ },
253
+ {
254
+ "name": "notNullInvoice",
255
+ "description": "Find invoice",
256
+ "args": [
257
+ {
258
+ "name": "id",
259
+ "description": null,
260
+ "type": {
261
+ "kind": "SCALAR",
262
+ "name": "Int",
263
+ "ofType": null
264
+ },
265
+ "defaultValue": null
266
+ }
267
+ ],
268
+ "type": {
269
+ "kind": "NON_NULL",
270
+ "name": null,
271
+ "ofType": {
272
+ "kind": "OBJECT",
273
+ "name": "Invoice",
274
+ "ofType": null
275
+ }
276
+ },
277
+ "isDeprecated": false,
278
+ "deprecationReason": null
279
+ }
280
+ ],
281
+ "inputFields": null,
282
+ "interfaces": [
283
+
284
+ ],
285
+ "enumValues": null,
286
+ "possibleTypes": null
287
+ },
288
+ {
289
+ "kind": "SCALAR",
290
+ "name": "String",
291
+ "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
292
+ "fields": null,
293
+ "inputFields": null,
294
+ "interfaces": null,
295
+ "enumValues": null,
296
+ "possibleTypes": null
297
+ },
298
+ {
299
+ "kind": "OBJECT",
300
+ "name": "__Directive",
301
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
302
+ "fields": [
303
+ {
304
+ "name": "args",
305
+ "description": null,
306
+ "args": [
307
+
308
+ ],
309
+ "type": {
310
+ "kind": "NON_NULL",
311
+ "name": null,
312
+ "ofType": {
313
+ "kind": "LIST",
314
+ "name": null,
315
+ "ofType": {
316
+ "kind": "NON_NULL",
317
+ "name": null,
318
+ "ofType": {
319
+ "kind": "OBJECT",
320
+ "name": "__InputValue",
321
+ "ofType": null
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "isDeprecated": false,
327
+ "deprecationReason": null
328
+ },
329
+ {
330
+ "name": "description",
331
+ "description": null,
332
+ "args": [
333
+
334
+ ],
335
+ "type": {
336
+ "kind": "SCALAR",
337
+ "name": "String",
338
+ "ofType": null
339
+ },
340
+ "isDeprecated": false,
341
+ "deprecationReason": null
342
+ },
343
+ {
344
+ "name": "locations",
345
+ "description": null,
346
+ "args": [
347
+
348
+ ],
349
+ "type": {
350
+ "kind": "NON_NULL",
351
+ "name": null,
352
+ "ofType": {
353
+ "kind": "LIST",
354
+ "name": null,
355
+ "ofType": {
356
+ "kind": "NON_NULL",
357
+ "name": null,
358
+ "ofType": {
359
+ "kind": "ENUM",
360
+ "name": "__DirectiveLocation",
361
+ "ofType": null
362
+ }
363
+ }
364
+ }
365
+ },
366
+ "isDeprecated": false,
367
+ "deprecationReason": null
368
+ },
369
+ {
370
+ "name": "name",
371
+ "description": null,
372
+ "args": [
373
+
374
+ ],
375
+ "type": {
376
+ "kind": "NON_NULL",
377
+ "name": null,
378
+ "ofType": {
379
+ "kind": "SCALAR",
380
+ "name": "String",
381
+ "ofType": null
382
+ }
383
+ },
384
+ "isDeprecated": false,
385
+ "deprecationReason": null
386
+ },
387
+ {
388
+ "name": "onField",
389
+ "description": null,
390
+ "args": [
391
+
392
+ ],
393
+ "type": {
394
+ "kind": "NON_NULL",
395
+ "name": null,
396
+ "ofType": {
397
+ "kind": "SCALAR",
398
+ "name": "Boolean",
399
+ "ofType": null
400
+ }
401
+ },
402
+ "isDeprecated": true,
403
+ "deprecationReason": "Use `locations`."
404
+ },
405
+ {
406
+ "name": "onFragment",
407
+ "description": null,
408
+ "args": [
409
+
410
+ ],
411
+ "type": {
412
+ "kind": "NON_NULL",
413
+ "name": null,
414
+ "ofType": {
415
+ "kind": "SCALAR",
416
+ "name": "Boolean",
417
+ "ofType": null
418
+ }
419
+ },
420
+ "isDeprecated": true,
421
+ "deprecationReason": "Use `locations`."
422
+ },
423
+ {
424
+ "name": "onOperation",
425
+ "description": null,
426
+ "args": [
427
+
428
+ ],
429
+ "type": {
430
+ "kind": "NON_NULL",
431
+ "name": null,
432
+ "ofType": {
433
+ "kind": "SCALAR",
434
+ "name": "Boolean",
435
+ "ofType": null
436
+ }
437
+ },
438
+ "isDeprecated": true,
439
+ "deprecationReason": "Use `locations`."
440
+ }
441
+ ],
442
+ "inputFields": null,
443
+ "interfaces": [
444
+
445
+ ],
446
+ "enumValues": null,
447
+ "possibleTypes": null
448
+ },
449
+ {
450
+ "kind": "ENUM",
451
+ "name": "__DirectiveLocation",
452
+ "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
453
+ "fields": null,
454
+ "inputFields": null,
455
+ "interfaces": null,
456
+ "enumValues": [
457
+ {
458
+ "name": "QUERY",
459
+ "description": "Location adjacent to a query operation.",
460
+ "isDeprecated": false,
461
+ "deprecationReason": null
462
+ },
463
+ {
464
+ "name": "MUTATION",
465
+ "description": "Location adjacent to a mutation operation.",
466
+ "isDeprecated": false,
467
+ "deprecationReason": null
468
+ },
469
+ {
470
+ "name": "SUBSCRIPTION",
471
+ "description": "Location adjacent to a subscription operation.",
472
+ "isDeprecated": false,
473
+ "deprecationReason": null
474
+ },
475
+ {
476
+ "name": "FIELD",
477
+ "description": "Location adjacent to a field.",
478
+ "isDeprecated": false,
479
+ "deprecationReason": null
480
+ },
481
+ {
482
+ "name": "FRAGMENT_DEFINITION",
483
+ "description": "Location adjacent to a fragment definition.",
484
+ "isDeprecated": false,
485
+ "deprecationReason": null
486
+ },
487
+ {
488
+ "name": "FRAGMENT_SPREAD",
489
+ "description": "Location adjacent to a fragment spread.",
490
+ "isDeprecated": false,
491
+ "deprecationReason": null
492
+ },
493
+ {
494
+ "name": "INLINE_FRAGMENT",
495
+ "description": "Location adjacent to an inline fragment.",
496
+ "isDeprecated": false,
497
+ "deprecationReason": null
498
+ },
499
+ {
500
+ "name": "SCHEMA",
501
+ "description": "Location adjacent to a schema definition.",
502
+ "isDeprecated": false,
503
+ "deprecationReason": null
504
+ },
505
+ {
506
+ "name": "SCALAR",
507
+ "description": "Location adjacent to a scalar definition.",
508
+ "isDeprecated": false,
509
+ "deprecationReason": null
510
+ },
511
+ {
512
+ "name": "OBJECT",
513
+ "description": "Location adjacent to an object type definition.",
514
+ "isDeprecated": false,
515
+ "deprecationReason": null
516
+ },
517
+ {
518
+ "name": "FIELD_DEFINITION",
519
+ "description": "Location adjacent to a field definition.",
520
+ "isDeprecated": false,
521
+ "deprecationReason": null
522
+ },
523
+ {
524
+ "name": "ARGUMENT_DEFINITION",
525
+ "description": "Location adjacent to an argument definition.",
526
+ "isDeprecated": false,
527
+ "deprecationReason": null
528
+ },
529
+ {
530
+ "name": "INTERFACE",
531
+ "description": "Location adjacent to an interface definition.",
532
+ "isDeprecated": false,
533
+ "deprecationReason": null
534
+ },
535
+ {
536
+ "name": "UNION",
537
+ "description": "Location adjacent to a union definition.",
538
+ "isDeprecated": false,
539
+ "deprecationReason": null
540
+ },
541
+ {
542
+ "name": "ENUM",
543
+ "description": "Location adjacent to an enum definition.",
544
+ "isDeprecated": false,
545
+ "deprecationReason": null
546
+ },
547
+ {
548
+ "name": "ENUM_VALUE",
549
+ "description": "Location adjacent to an enum value definition.",
550
+ "isDeprecated": false,
551
+ "deprecationReason": null
552
+ },
553
+ {
554
+ "name": "INPUT_OBJECT",
555
+ "description": "Location adjacent to an input object type definition.",
556
+ "isDeprecated": false,
557
+ "deprecationReason": null
558
+ },
559
+ {
560
+ "name": "INPUT_FIELD_DEFINITION",
561
+ "description": "Location adjacent to an input object field definition.",
562
+ "isDeprecated": false,
563
+ "deprecationReason": null
564
+ }
565
+ ],
566
+ "possibleTypes": null
567
+ },
568
+ {
569
+ "kind": "OBJECT",
570
+ "name": "__EnumValue",
571
+ "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
572
+ "fields": [
573
+ {
574
+ "name": "deprecationReason",
575
+ "description": null,
576
+ "args": [
577
+
578
+ ],
579
+ "type": {
580
+ "kind": "SCALAR",
581
+ "name": "String",
582
+ "ofType": null
583
+ },
584
+ "isDeprecated": false,
585
+ "deprecationReason": null
586
+ },
587
+ {
588
+ "name": "description",
589
+ "description": null,
590
+ "args": [
591
+
592
+ ],
593
+ "type": {
594
+ "kind": "SCALAR",
595
+ "name": "String",
596
+ "ofType": null
597
+ },
598
+ "isDeprecated": false,
599
+ "deprecationReason": null
600
+ },
601
+ {
602
+ "name": "isDeprecated",
603
+ "description": null,
604
+ "args": [
605
+
606
+ ],
607
+ "type": {
608
+ "kind": "NON_NULL",
609
+ "name": null,
610
+ "ofType": {
611
+ "kind": "SCALAR",
612
+ "name": "Boolean",
613
+ "ofType": null
614
+ }
615
+ },
616
+ "isDeprecated": false,
617
+ "deprecationReason": null
618
+ },
619
+ {
620
+ "name": "name",
621
+ "description": null,
622
+ "args": [
623
+
624
+ ],
625
+ "type": {
626
+ "kind": "NON_NULL",
627
+ "name": null,
628
+ "ofType": {
629
+ "kind": "SCALAR",
630
+ "name": "String",
631
+ "ofType": null
632
+ }
633
+ },
634
+ "isDeprecated": false,
635
+ "deprecationReason": null
636
+ }
637
+ ],
638
+ "inputFields": null,
639
+ "interfaces": [
640
+
641
+ ],
642
+ "enumValues": null,
643
+ "possibleTypes": null
644
+ },
645
+ {
646
+ "kind": "OBJECT",
647
+ "name": "__Field",
648
+ "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
649
+ "fields": [
650
+ {
651
+ "name": "args",
652
+ "description": null,
653
+ "args": [
654
+
655
+ ],
656
+ "type": {
657
+ "kind": "NON_NULL",
658
+ "name": null,
659
+ "ofType": {
660
+ "kind": "LIST",
661
+ "name": null,
662
+ "ofType": {
663
+ "kind": "NON_NULL",
664
+ "name": null,
665
+ "ofType": {
666
+ "kind": "OBJECT",
667
+ "name": "__InputValue",
668
+ "ofType": null
669
+ }
670
+ }
671
+ }
672
+ },
673
+ "isDeprecated": false,
674
+ "deprecationReason": null
675
+ },
676
+ {
677
+ "name": "deprecationReason",
678
+ "description": null,
679
+ "args": [
680
+
681
+ ],
682
+ "type": {
683
+ "kind": "SCALAR",
684
+ "name": "String",
685
+ "ofType": null
686
+ },
687
+ "isDeprecated": false,
688
+ "deprecationReason": null
689
+ },
690
+ {
691
+ "name": "description",
692
+ "description": null,
693
+ "args": [
694
+
695
+ ],
696
+ "type": {
697
+ "kind": "SCALAR",
698
+ "name": "String",
699
+ "ofType": null
700
+ },
701
+ "isDeprecated": false,
702
+ "deprecationReason": null
703
+ },
704
+ {
705
+ "name": "isDeprecated",
706
+ "description": null,
707
+ "args": [
708
+
709
+ ],
710
+ "type": {
711
+ "kind": "NON_NULL",
712
+ "name": null,
713
+ "ofType": {
714
+ "kind": "SCALAR",
715
+ "name": "Boolean",
716
+ "ofType": null
717
+ }
718
+ },
719
+ "isDeprecated": false,
720
+ "deprecationReason": null
721
+ },
722
+ {
723
+ "name": "name",
724
+ "description": null,
725
+ "args": [
726
+
727
+ ],
728
+ "type": {
729
+ "kind": "NON_NULL",
730
+ "name": null,
731
+ "ofType": {
732
+ "kind": "SCALAR",
733
+ "name": "String",
734
+ "ofType": null
735
+ }
736
+ },
737
+ "isDeprecated": false,
738
+ "deprecationReason": null
739
+ },
740
+ {
741
+ "name": "type",
742
+ "description": null,
743
+ "args": [
744
+
745
+ ],
746
+ "type": {
747
+ "kind": "NON_NULL",
748
+ "name": null,
749
+ "ofType": {
750
+ "kind": "OBJECT",
751
+ "name": "__Type",
752
+ "ofType": null
753
+ }
754
+ },
755
+ "isDeprecated": false,
756
+ "deprecationReason": null
757
+ }
758
+ ],
759
+ "inputFields": null,
760
+ "interfaces": [
761
+
762
+ ],
763
+ "enumValues": null,
764
+ "possibleTypes": null
765
+ },
766
+ {
767
+ "kind": "OBJECT",
768
+ "name": "__InputValue",
769
+ "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
770
+ "fields": [
771
+ {
772
+ "name": "defaultValue",
773
+ "description": "A GraphQL-formatted string representing the default value for this input value.",
774
+ "args": [
775
+
776
+ ],
777
+ "type": {
778
+ "kind": "SCALAR",
779
+ "name": "String",
780
+ "ofType": null
781
+ },
782
+ "isDeprecated": false,
783
+ "deprecationReason": null
784
+ },
785
+ {
786
+ "name": "description",
787
+ "description": null,
788
+ "args": [
789
+
790
+ ],
791
+ "type": {
792
+ "kind": "SCALAR",
793
+ "name": "String",
794
+ "ofType": null
795
+ },
796
+ "isDeprecated": false,
797
+ "deprecationReason": null
798
+ },
799
+ {
800
+ "name": "name",
801
+ "description": null,
802
+ "args": [
803
+
804
+ ],
805
+ "type": {
806
+ "kind": "NON_NULL",
807
+ "name": null,
808
+ "ofType": {
809
+ "kind": "SCALAR",
810
+ "name": "String",
811
+ "ofType": null
812
+ }
813
+ },
814
+ "isDeprecated": false,
815
+ "deprecationReason": null
816
+ },
817
+ {
818
+ "name": "type",
819
+ "description": null,
820
+ "args": [
821
+
822
+ ],
823
+ "type": {
824
+ "kind": "NON_NULL",
825
+ "name": null,
826
+ "ofType": {
827
+ "kind": "OBJECT",
828
+ "name": "__Type",
829
+ "ofType": null
830
+ }
831
+ },
832
+ "isDeprecated": false,
833
+ "deprecationReason": null
834
+ }
835
+ ],
836
+ "inputFields": null,
837
+ "interfaces": [
838
+
839
+ ],
840
+ "enumValues": null,
841
+ "possibleTypes": null
842
+ },
843
+ {
844
+ "kind": "OBJECT",
845
+ "name": "__Schema",
846
+ "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
847
+ "fields": [
848
+ {
849
+ "name": "directives",
850
+ "description": "A list of all directives supported by this server.",
851
+ "args": [
852
+
853
+ ],
854
+ "type": {
855
+ "kind": "NON_NULL",
856
+ "name": null,
857
+ "ofType": {
858
+ "kind": "LIST",
859
+ "name": null,
860
+ "ofType": {
861
+ "kind": "NON_NULL",
862
+ "name": null,
863
+ "ofType": {
864
+ "kind": "OBJECT",
865
+ "name": "__Directive",
866
+ "ofType": null
867
+ }
868
+ }
869
+ }
870
+ },
871
+ "isDeprecated": false,
872
+ "deprecationReason": null
873
+ },
874
+ {
875
+ "name": "mutationType",
876
+ "description": "If this server supports mutation, the type that mutation operations will be rooted at.",
877
+ "args": [
878
+
879
+ ],
880
+ "type": {
881
+ "kind": "OBJECT",
882
+ "name": "__Type",
883
+ "ofType": null
884
+ },
885
+ "isDeprecated": false,
886
+ "deprecationReason": null
887
+ },
888
+ {
889
+ "name": "queryType",
890
+ "description": "The type that query operations will be rooted at.",
891
+ "args": [
892
+
893
+ ],
894
+ "type": {
895
+ "kind": "NON_NULL",
896
+ "name": null,
897
+ "ofType": {
898
+ "kind": "OBJECT",
899
+ "name": "__Type",
900
+ "ofType": null
901
+ }
902
+ },
903
+ "isDeprecated": false,
904
+ "deprecationReason": null
905
+ },
906
+ {
907
+ "name": "subscriptionType",
908
+ "description": "If this server support subscription, the type that subscription operations will be rooted at.",
909
+ "args": [
910
+
911
+ ],
912
+ "type": {
913
+ "kind": "OBJECT",
914
+ "name": "__Type",
915
+ "ofType": null
916
+ },
917
+ "isDeprecated": false,
918
+ "deprecationReason": null
919
+ },
920
+ {
921
+ "name": "types",
922
+ "description": "A list of all types supported by this server.",
923
+ "args": [
924
+
925
+ ],
926
+ "type": {
927
+ "kind": "NON_NULL",
928
+ "name": null,
929
+ "ofType": {
930
+ "kind": "LIST",
931
+ "name": null,
932
+ "ofType": {
933
+ "kind": "NON_NULL",
934
+ "name": null,
935
+ "ofType": {
936
+ "kind": "OBJECT",
937
+ "name": "__Type",
938
+ "ofType": null
939
+ }
940
+ }
941
+ }
942
+ },
943
+ "isDeprecated": false,
944
+ "deprecationReason": null
945
+ }
946
+ ],
947
+ "inputFields": null,
948
+ "interfaces": [
949
+
950
+ ],
951
+ "enumValues": null,
952
+ "possibleTypes": null
953
+ },
954
+ {
955
+ "kind": "OBJECT",
956
+ "name": "__Type",
957
+ "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
958
+ "fields": [
959
+ {
960
+ "name": "description",
961
+ "description": null,
962
+ "args": [
963
+
964
+ ],
965
+ "type": {
966
+ "kind": "SCALAR",
967
+ "name": "String",
968
+ "ofType": null
969
+ },
970
+ "isDeprecated": false,
971
+ "deprecationReason": null
972
+ },
973
+ {
974
+ "name": "enumValues",
975
+ "description": null,
976
+ "args": [
977
+ {
978
+ "name": "includeDeprecated",
979
+ "description": null,
980
+ "type": {
981
+ "kind": "SCALAR",
982
+ "name": "Boolean",
983
+ "ofType": null
984
+ },
985
+ "defaultValue": "false"
986
+ }
987
+ ],
988
+ "type": {
989
+ "kind": "LIST",
990
+ "name": null,
991
+ "ofType": {
992
+ "kind": "NON_NULL",
993
+ "name": null,
994
+ "ofType": {
995
+ "kind": "OBJECT",
996
+ "name": "__EnumValue",
997
+ "ofType": null
998
+ }
999
+ }
1000
+ },
1001
+ "isDeprecated": false,
1002
+ "deprecationReason": null
1003
+ },
1004
+ {
1005
+ "name": "fields",
1006
+ "description": null,
1007
+ "args": [
1008
+ {
1009
+ "name": "includeDeprecated",
1010
+ "description": null,
1011
+ "type": {
1012
+ "kind": "SCALAR",
1013
+ "name": "Boolean",
1014
+ "ofType": null
1015
+ },
1016
+ "defaultValue": "false"
1017
+ }
1018
+ ],
1019
+ "type": {
1020
+ "kind": "LIST",
1021
+ "name": null,
1022
+ "ofType": {
1023
+ "kind": "NON_NULL",
1024
+ "name": null,
1025
+ "ofType": {
1026
+ "kind": "OBJECT",
1027
+ "name": "__Field",
1028
+ "ofType": null
1029
+ }
1030
+ }
1031
+ },
1032
+ "isDeprecated": false,
1033
+ "deprecationReason": null
1034
+ },
1035
+ {
1036
+ "name": "inputFields",
1037
+ "description": null,
1038
+ "args": [
1039
+
1040
+ ],
1041
+ "type": {
1042
+ "kind": "LIST",
1043
+ "name": null,
1044
+ "ofType": {
1045
+ "kind": "NON_NULL",
1046
+ "name": null,
1047
+ "ofType": {
1048
+ "kind": "OBJECT",
1049
+ "name": "__InputValue",
1050
+ "ofType": null
1051
+ }
1052
+ }
1053
+ },
1054
+ "isDeprecated": false,
1055
+ "deprecationReason": null
1056
+ },
1057
+ {
1058
+ "name": "interfaces",
1059
+ "description": null,
1060
+ "args": [
1061
+
1062
+ ],
1063
+ "type": {
1064
+ "kind": "LIST",
1065
+ "name": null,
1066
+ "ofType": {
1067
+ "kind": "NON_NULL",
1068
+ "name": null,
1069
+ "ofType": {
1070
+ "kind": "OBJECT",
1071
+ "name": "__Type",
1072
+ "ofType": null
1073
+ }
1074
+ }
1075
+ },
1076
+ "isDeprecated": false,
1077
+ "deprecationReason": null
1078
+ },
1079
+ {
1080
+ "name": "kind",
1081
+ "description": null,
1082
+ "args": [
1083
+
1084
+ ],
1085
+ "type": {
1086
+ "kind": "NON_NULL",
1087
+ "name": null,
1088
+ "ofType": {
1089
+ "kind": "ENUM",
1090
+ "name": "__TypeKind",
1091
+ "ofType": null
1092
+ }
1093
+ },
1094
+ "isDeprecated": false,
1095
+ "deprecationReason": null
1096
+ },
1097
+ {
1098
+ "name": "name",
1099
+ "description": null,
1100
+ "args": [
1101
+
1102
+ ],
1103
+ "type": {
1104
+ "kind": "SCALAR",
1105
+ "name": "String",
1106
+ "ofType": null
1107
+ },
1108
+ "isDeprecated": false,
1109
+ "deprecationReason": null
1110
+ },
1111
+ {
1112
+ "name": "ofType",
1113
+ "description": null,
1114
+ "args": [
1115
+
1116
+ ],
1117
+ "type": {
1118
+ "kind": "OBJECT",
1119
+ "name": "__Type",
1120
+ "ofType": null
1121
+ },
1122
+ "isDeprecated": false,
1123
+ "deprecationReason": null
1124
+ },
1125
+ {
1126
+ "name": "possibleTypes",
1127
+ "description": null,
1128
+ "args": [
1129
+
1130
+ ],
1131
+ "type": {
1132
+ "kind": "LIST",
1133
+ "name": null,
1134
+ "ofType": {
1135
+ "kind": "NON_NULL",
1136
+ "name": null,
1137
+ "ofType": {
1138
+ "kind": "OBJECT",
1139
+ "name": "__Type",
1140
+ "ofType": null
1141
+ }
1142
+ }
1143
+ },
1144
+ "isDeprecated": false,
1145
+ "deprecationReason": null
1146
+ }
1147
+ ],
1148
+ "inputFields": null,
1149
+ "interfaces": [
1150
+
1151
+ ],
1152
+ "enumValues": null,
1153
+ "possibleTypes": null
1154
+ },
1155
+ {
1156
+ "kind": "ENUM",
1157
+ "name": "__TypeKind",
1158
+ "description": "An enum describing what kind of type a given `__Type` is.",
1159
+ "fields": null,
1160
+ "inputFields": null,
1161
+ "interfaces": null,
1162
+ "enumValues": [
1163
+ {
1164
+ "name": "SCALAR",
1165
+ "description": "Indicates this type is a scalar.",
1166
+ "isDeprecated": false,
1167
+ "deprecationReason": null
1168
+ },
1169
+ {
1170
+ "name": "OBJECT",
1171
+ "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
1172
+ "isDeprecated": false,
1173
+ "deprecationReason": null
1174
+ },
1175
+ {
1176
+ "name": "INTERFACE",
1177
+ "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
1178
+ "isDeprecated": false,
1179
+ "deprecationReason": null
1180
+ },
1181
+ {
1182
+ "name": "UNION",
1183
+ "description": "Indicates this type is a union. `possibleTypes` is a valid field.",
1184
+ "isDeprecated": false,
1185
+ "deprecationReason": null
1186
+ },
1187
+ {
1188
+ "name": "ENUM",
1189
+ "description": "Indicates this type is an enum. `enumValues` is a valid field.",
1190
+ "isDeprecated": false,
1191
+ "deprecationReason": null
1192
+ },
1193
+ {
1194
+ "name": "INPUT_OBJECT",
1195
+ "description": "Indicates this type is an input object. `inputFields` is a valid field.",
1196
+ "isDeprecated": false,
1197
+ "deprecationReason": null
1198
+ },
1199
+ {
1200
+ "name": "LIST",
1201
+ "description": "Indicates this type is a list. `ofType` is a valid field.",
1202
+ "isDeprecated": false,
1203
+ "deprecationReason": null
1204
+ },
1205
+ {
1206
+ "name": "NON_NULL",
1207
+ "description": "Indicates this type is a non-null. `ofType` is a valid field.",
1208
+ "isDeprecated": false,
1209
+ "deprecationReason": null
1210
+ }
1211
+ ],
1212
+ "possibleTypes": null
1213
+ }
1214
+ ],
1215
+ "directives": [
1216
+ {
1217
+ "name": "include",
1218
+ "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
1219
+ "locations": [
1220
+ "FIELD",
1221
+ "FRAGMENT_SPREAD",
1222
+ "INLINE_FRAGMENT"
1223
+ ],
1224
+ "args": [
1225
+ {
1226
+ "name": "if",
1227
+ "description": "Included when true.",
1228
+ "type": {
1229
+ "kind": "NON_NULL",
1230
+ "name": null,
1231
+ "ofType": {
1232
+ "kind": "SCALAR",
1233
+ "name": "Boolean",
1234
+ "ofType": null
1235
+ }
1236
+ },
1237
+ "defaultValue": null
1238
+ }
1239
+ ]
1240
+ },
1241
+ {
1242
+ "name": "skip",
1243
+ "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
1244
+ "locations": [
1245
+ "FIELD",
1246
+ "FRAGMENT_SPREAD",
1247
+ "INLINE_FRAGMENT"
1248
+ ],
1249
+ "args": [
1250
+ {
1251
+ "name": "if",
1252
+ "description": "Skipped when true.",
1253
+ "type": {
1254
+ "kind": "NON_NULL",
1255
+ "name": null,
1256
+ "ofType": {
1257
+ "kind": "SCALAR",
1258
+ "name": "Boolean",
1259
+ "ofType": null
1260
+ }
1261
+ },
1262
+ "defaultValue": null
1263
+ }
1264
+ ]
1265
+ },
1266
+ {
1267
+ "name": "deprecated",
1268
+ "description": "Marks an element of a GraphQL schema as no longer supported.",
1269
+ "locations": [
1270
+ "FIELD_DEFINITION",
1271
+ "ENUM_VALUE"
1272
+ ],
1273
+ "args": [
1274
+ {
1275
+ "name": "reason",
1276
+ "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",
1277
+ "type": {
1278
+ "kind": "SCALAR",
1279
+ "name": "String",
1280
+ "ofType": null
1281
+ },
1282
+ "defaultValue": "\"No longer supported\""
1283
+ }
1284
+ ]
1285
+ }
1286
+ ]
1287
+ }
1288
+ }
1289
+ }