rails-graphql 1.0.0.beta → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gql_parser.c +1 -16
- data/ext/gql_parser.h +21 -0
- data/ext/shared.c +0 -5
- data/ext/shared.h +6 -6
- data/lib/generators/graphql/channel_generator.rb +27 -0
- data/lib/generators/graphql/controller_generator.rb +9 -4
- data/lib/generators/graphql/install_generator.rb +49 -0
- data/lib/generators/graphql/schema_generator.rb +9 -4
- data/lib/generators/graphql/templates/channel.erb +7 -0
- data/lib/generators/graphql/templates/config.rb +97 -0
- data/lib/generators/graphql/templates/controller.erb +2 -0
- data/lib/generators/graphql/templates/schema.erb +5 -3
- data/lib/gql_parser.so +0 -0
- data/lib/rails/graphql/alternative/field_set.rb +12 -0
- data/lib/rails/graphql/alternative/query.rb +9 -4
- data/lib/rails/graphql/alternative/subscription.rb +2 -1
- data/lib/rails/graphql/argument.rb +5 -3
- data/lib/rails/graphql/callback.rb +8 -7
- data/lib/rails/graphql/collectors/hash_collector.rb +12 -1
- data/lib/rails/graphql/collectors/json_collector.rb +21 -0
- data/lib/rails/graphql/config.rb +73 -57
- data/lib/rails/graphql/directive/include_directive.rb +0 -1
- data/lib/rails/graphql/directive/skip_directive.rb +0 -1
- data/lib/rails/graphql/directive/specified_by_directive.rb +24 -0
- data/lib/rails/graphql/directive.rb +30 -24
- data/lib/rails/graphql/event.rb +7 -6
- data/lib/rails/graphql/field/authorized_field.rb +0 -5
- data/lib/rails/graphql/field/input_field.rb +0 -5
- data/lib/rails/graphql/field/mutation_field.rb +5 -6
- data/lib/rails/graphql/field/output_field.rb +13 -2
- data/lib/rails/graphql/field/proxied_field.rb +5 -5
- data/lib/rails/graphql/field/resolved_field.rb +1 -1
- data/lib/rails/graphql/field/subscription_field.rb +35 -52
- data/lib/rails/graphql/field/typed_field.rb +26 -2
- data/lib/rails/graphql/field.rb +20 -19
- data/lib/rails/graphql/global_id.rb +5 -1
- data/lib/rails/graphql/helpers/inherited_collection/array.rb +1 -0
- data/lib/rails/graphql/helpers/inherited_collection/base.rb +2 -0
- data/lib/rails/graphql/helpers/inherited_collection/hash.rb +2 -1
- data/lib/rails/graphql/helpers/registerable.rb +1 -1
- data/lib/rails/graphql/helpers/with_arguments.rb +3 -2
- data/lib/rails/graphql/helpers/with_callbacks.rb +3 -3
- data/lib/rails/graphql/helpers/with_description.rb +10 -8
- data/lib/rails/graphql/helpers/with_directives.rb +5 -1
- data/lib/rails/graphql/helpers/with_events.rb +1 -0
- data/lib/rails/graphql/helpers/with_fields.rb +28 -22
- data/lib/rails/graphql/helpers/with_name.rb +3 -2
- data/lib/rails/graphql/helpers/with_schema_fields.rb +72 -48
- data/lib/rails/graphql/introspection.rb +1 -1
- data/lib/rails/graphql/railtie.rb +3 -2
- data/lib/rails/graphql/railties/app/base_channel.rb +10 -0
- data/lib/rails/graphql/railties/app/base_controller.rb +12 -0
- data/lib/rails/graphql/railties/app/views/_cable.js.erb +56 -0
- data/lib/rails/graphql/railties/app/views/_fetch.js.erb +20 -0
- data/lib/rails/graphql/railties/app/views/graphiql.html.erb +101 -0
- data/lib/rails/graphql/railties/base_generator.rb +3 -9
- data/lib/rails/graphql/railties/channel.rb +8 -8
- data/lib/rails/graphql/railties/controller.rb +45 -24
- data/lib/rails/graphql/request/arguments.rb +2 -1
- data/lib/rails/graphql/request/backtrace.rb +31 -10
- data/lib/rails/graphql/request/component/field.rb +15 -8
- data/lib/rails/graphql/request/component/fragment.rb +13 -7
- data/lib/rails/graphql/request/component/operation/subscription.rb +4 -6
- data/lib/rails/graphql/request/component/operation.rb +11 -4
- data/lib/rails/graphql/request/component/spread.rb +13 -4
- data/lib/rails/graphql/request/component/typename.rb +1 -1
- data/lib/rails/graphql/request/component.rb +2 -0
- data/lib/rails/graphql/request/context.rb +1 -1
- data/lib/rails/graphql/request/event.rb +6 -2
- data/lib/rails/graphql/request/helpers/directives.rb +1 -0
- data/lib/rails/graphql/request/helpers/selection_set.rb +10 -4
- data/lib/rails/graphql/request/helpers/value_writers.rb +8 -5
- data/lib/rails/graphql/request/prepared_data.rb +3 -1
- data/lib/rails/graphql/request/steps/organizable.rb +1 -1
- data/lib/rails/graphql/request/steps/preparable.rb +1 -1
- data/lib/rails/graphql/request/steps/resolvable.rb +1 -1
- data/lib/rails/graphql/request/strategy/sequenced_strategy.rb +3 -3
- data/lib/rails/graphql/request/strategy.rb +18 -4
- data/lib/rails/graphql/request/subscription.rb +18 -16
- data/lib/rails/graphql/request.rb +67 -37
- data/lib/rails/graphql/schema.rb +39 -86
- data/lib/rails/graphql/shortcuts.rb +11 -5
- data/lib/rails/graphql/source/active_record/builders.rb +20 -21
- data/lib/rails/graphql/source/active_record_source.rb +93 -33
- data/lib/rails/graphql/source/base.rb +11 -39
- data/lib/rails/graphql/source/builder.rb +9 -22
- data/lib/rails/graphql/source/scoped_arguments.rb +10 -4
- data/lib/rails/graphql/source.rb +23 -37
- data/lib/rails/graphql/subscription/provider/action_cable.rb +10 -9
- data/lib/rails/graphql/subscription/provider/base.rb +6 -5
- data/lib/rails/graphql/subscription/store/base.rb +5 -9
- data/lib/rails/graphql/subscription/store/memory.rb +18 -9
- data/lib/rails/graphql/type/creator.rb +196 -0
- data/lib/rails/graphql/type/enum.rb +17 -9
- data/lib/rails/graphql/type/input.rb +20 -4
- data/lib/rails/graphql/type/interface.rb +15 -4
- data/lib/rails/graphql/type/object/directive_object.rb +6 -5
- data/lib/rails/graphql/type/object/input_value_object.rb +3 -4
- data/lib/rails/graphql/type/object/type_object.rb +40 -13
- data/lib/rails/graphql/type/object.rb +10 -5
- data/lib/rails/graphql/type/scalar/binary_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/date_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/date_time_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/decimal_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/json_scalar.rb +3 -1
- data/lib/rails/graphql/type/scalar/time_scalar.rb +3 -1
- data/lib/rails/graphql/type/scalar.rb +1 -1
- data/lib/rails/graphql/type/union.rb +7 -2
- data/lib/rails/graphql/type.rb +10 -2
- data/lib/rails/graphql/type_map.rb +18 -7
- data/lib/rails/graphql/uri.rb +5 -4
- data/lib/rails/graphql/version.rb +6 -2
- data/lib/rails/graphql.rb +9 -7
- data/test/assets/introspection-mem.txt +1 -1
- data/test/assets/introspection.gql +2 -0
- data/test/assets/mem.gql +74 -60
- data/test/assets/mysql.gql +69 -55
- data/test/assets/sqlite.gql +78 -64
- data/test/assets/translate.gql +50 -39
- data/test/config.rb +2 -1
- data/test/graphql/schema_test.rb +2 -31
- data/test/graphql/source_test.rb +0 -10
- data/test/graphql/type/interface_test.rb +8 -5
- data/test/graphql/type/object_test.rb +8 -2
- data/test/graphql/type_map_test.rb +13 -16
- data/test/integration/global_id_test.rb +4 -4
- data/test/integration/memory/star_wars_validation_test.rb +2 -2
- data/test/integration/mysql/star_wars_introspection_test.rb +1 -1
- data/test/integration/resolver_precedence_test.rb +1 -1
- data/test/integration/schemas/memory.rb +3 -4
- data/test/integration/sqlite/star_wars_global_id_test.rb +27 -21
- data/test/integration/sqlite/star_wars_introspection_test.rb +1 -1
- data/test/integration/translate_test.rb +26 -14
- metadata +20 -7
@@ -10,9 +10,11 @@ module Rails
|
|
10
10
|
|
11
11
|
desc <<~MSG
|
12
12
|
The Time scalar type that represents a distance in time using hours,
|
13
|
-
minutes, seconds, and
|
13
|
+
minutes, seconds, and milliseconds.
|
14
14
|
MSG
|
15
15
|
|
16
|
+
use :specified_by, url: 'https://www.rfc-editor.org/rfc/rfc3339'
|
17
|
+
|
16
18
|
# A +base_object+ helps to identify what methods are actually available
|
17
19
|
# to work as resolvers
|
18
20
|
class_attribute :precision, instance_accessor: false, default: 6
|
@@ -20,6 +20,11 @@ module Rails
|
|
20
20
|
inherited_collection :members, instance_reader: false
|
21
21
|
|
22
22
|
class << self
|
23
|
+
# Figure out which one of the members is compatible with the provided +value+
|
24
|
+
def type_for(value, *)
|
25
|
+
all_members&.reverse_each&.find { |t| t.valid_member?(value) }
|
26
|
+
end
|
27
|
+
|
23
28
|
# Return the base type of the objects on this union
|
24
29
|
def of_kind
|
25
30
|
members.first.base_type
|
@@ -41,12 +46,12 @@ module Rails
|
|
41
46
|
GraphQL.type_map.fetch(item, namespaces: namespaces)
|
42
47
|
end
|
43
48
|
|
44
|
-
checker = others.
|
49
|
+
checker = others.map { |item| item.try(:base_type) }.uniq
|
45
50
|
raise ArgumentError, (+<<~MSG).squish unless checker.size === 1
|
46
51
|
All the union members must be of the same base class.
|
47
52
|
MSG
|
48
53
|
|
49
|
-
check_types = members? ? [
|
54
|
+
check_types = members? ? [of_kind] : VALID_MEMBER_TYPES
|
50
55
|
raise ArgumentError, (+<<~MSG).squish unless (check_types & checker).size === 1
|
51
56
|
A union cannot contain members of different base classes.
|
52
57
|
MSG
|
data/lib/rails/graphql/type.rb
CHANGED
@@ -13,6 +13,8 @@ module Rails
|
|
13
13
|
extend Helpers::WithGlobalID
|
14
14
|
extend Helpers::Registerable
|
15
15
|
|
16
|
+
autoload :Creator
|
17
|
+
|
16
18
|
# A direct representation of the spec types
|
17
19
|
KINDS = %w[Scalar Object Interface Union Enum Input].freeze
|
18
20
|
KINDS.each { |kind| autoload kind.to_sym }
|
@@ -81,7 +83,7 @@ module Rails
|
|
81
83
|
false
|
82
84
|
end
|
83
85
|
|
84
|
-
# A little helper to
|
86
|
+
# A little helper to instantiate the type if necessary
|
85
87
|
def decorate(value)
|
86
88
|
value
|
87
89
|
end
|
@@ -98,6 +100,11 @@ module Rails
|
|
98
100
|
+"#<GraphQL::#{base_type.name.demodulize} #{gql_name}>"
|
99
101
|
end
|
100
102
|
|
103
|
+
# Dynamically create a new type using the Creator
|
104
|
+
def create!(from, name, superclass = nil, **xargs, &configure)
|
105
|
+
Creator.create!(from, name, superclass || self, **xargs, &configure)
|
106
|
+
end
|
107
|
+
|
101
108
|
# Defines a series of question methods based on the kind
|
102
109
|
KINDS.each { |kind| define_method(:"#{kind.downcase}?") { false } }
|
103
110
|
|
@@ -107,7 +114,8 @@ module Rails
|
|
107
114
|
def setup!(**options)
|
108
115
|
return unless superclass.eql?(GraphQL::Type)
|
109
116
|
|
110
|
-
|
117
|
+
kind_value = options[:kind] || name.demodulize.underscore.to_sym
|
118
|
+
redefine_singleton_method(:kind) { kind_value }
|
111
119
|
self.directive_location = kind
|
112
120
|
|
113
121
|
redefine_singleton_method(:leaf_type?) { true } if options[:leaf]
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'concurrent/map'
|
4
|
-
require 'active_support/core_ext/class/subclasses'
|
5
4
|
|
6
5
|
module Rails
|
7
6
|
module GraphQL
|
@@ -17,9 +16,9 @@ module Rails
|
|
17
16
|
# The cache stores in the following structure:
|
18
17
|
# Namespace -> BaseClass -> ItemKey -> Item
|
19
18
|
class TypeMap
|
20
|
-
|
19
|
+
extend ActiveSupport::Autoload
|
21
20
|
|
22
|
-
|
21
|
+
FILTER_REGISTER_TRACE = /((inherited|initialize)'$|schema\.rb:\d+)/.freeze
|
23
22
|
|
24
23
|
# Store all the base classes that are managed by the Type Map
|
25
24
|
mattr_accessor :base_classes, instance_writer: false,
|
@@ -114,7 +113,8 @@ module Rails
|
|
114
113
|
object_name = object.gql_name
|
115
114
|
object_key = object.to_sym
|
116
115
|
alias_proc = -> do
|
117
|
-
|
116
|
+
value = dig(object_base, base_class, object_key)
|
117
|
+
value.is_a?(Proc) ? value.call : value
|
118
118
|
end
|
119
119
|
|
120
120
|
# TODO Warn when the base key is being assigned to a different object
|
@@ -144,13 +144,22 @@ module Rails
|
|
144
144
|
# Unregister all the provided objects by simply assigning nil to their
|
145
145
|
# final value on the index
|
146
146
|
def unregister(*objects)
|
147
|
+
sub_mod = Type::Creator::NESTED_MODULE
|
147
148
|
objects.each do |object|
|
148
149
|
namespaces = sanitize_namespaces(namespaces: object.namespaces, exclusive: true)
|
149
150
|
namespaces << :base if namespaces.empty?
|
150
151
|
base_class = find_base_class(object)
|
151
152
|
|
152
|
-
|
153
|
-
|
153
|
+
if object.kind != :source
|
154
|
+
@index[namespaces.first][base_class][object.to_sym] = nil
|
155
|
+
@objects -= 1
|
156
|
+
end
|
157
|
+
|
158
|
+
return unless object.const_defined?(sub_mod, false)
|
159
|
+
|
160
|
+
nested_mod = object.const_get(sub_mod)
|
161
|
+
unregister(*nested_mod.constants.map(&nested_mod.method(:const_get)))
|
162
|
+
object.send(:remove_const, sub_mod)
|
154
163
|
end
|
155
164
|
end
|
156
165
|
|
@@ -201,6 +210,7 @@ module Rails
|
|
201
210
|
# Find the given key or name inside the base class either on the given
|
202
211
|
# namespace or in the base +:base+ namespace
|
203
212
|
def fetch(key_or_name, prevent_register: nil, **xargs)
|
213
|
+
prevent_register = true if @pending.blank?
|
204
214
|
if prevent_register != true
|
205
215
|
items = prevent_register == true ? nil : ::Array.wrap(prevent_register)
|
206
216
|
skip_register << items.to_set
|
@@ -219,7 +229,7 @@ module Rails
|
|
219
229
|
end
|
220
230
|
end
|
221
231
|
ensure
|
222
|
-
skip_register.pop
|
232
|
+
skip_register.pop if prevent_register != true
|
223
233
|
end
|
224
234
|
|
225
235
|
# Checks if a given key or name is already defined under the same base
|
@@ -413,6 +423,7 @@ module Rails
|
|
413
423
|
"#{__dir__}/directive/deprecated_directive",
|
414
424
|
"#{__dir__}/directive/include_directive",
|
415
425
|
"#{__dir__}/directive/skip_directive",
|
426
|
+
"#{__dir__}/directive/specified_by_directive",
|
416
427
|
]
|
417
428
|
end
|
418
429
|
|
data/lib/rails/graphql/uri.rb
CHANGED
@@ -42,16 +42,17 @@ module URI
|
|
42
42
|
def create(object, scope = nil, params = nil)
|
43
43
|
namespace = Rails::GraphQL.enumerate(object.namespaces).first || :base
|
44
44
|
klass = object.gid_base_class
|
45
|
+
klass = klass.class unless klass.is_a?(Module)
|
45
46
|
|
46
47
|
xargs = { namespace: namespace, scope: scope, params: params }
|
47
48
|
xargs[:name] = object.gql_name unless klass == Rails::GraphQL::Schema
|
48
49
|
xargs[:class_name] =
|
49
50
|
case
|
50
51
|
when klass <= Rails::GraphQL::Schema then 'Schema'
|
52
|
+
when klass <= Rails::GraphQL::Source then 'Schema'
|
53
|
+
when klass <= Rails::GraphQL::Directive then 'Directive'
|
51
54
|
when klass.superclass == Rails::GraphQL::Type then 'Type'
|
52
|
-
else
|
53
|
-
klass_name = klass.is_a?(Module) ? klass.name : klass.class.name
|
54
|
-
klass_name.split('GraphQL::').last
|
55
|
+
else klass.gql_name
|
55
56
|
end
|
56
57
|
|
57
58
|
build(xargs)
|
@@ -80,7 +81,7 @@ module URI
|
|
80
81
|
|
81
82
|
# Make sure to convert dashes into underscore
|
82
83
|
def namespace
|
83
|
-
host.tr('-', '_')
|
84
|
+
host.tr('-', '_').to_sym
|
84
85
|
end
|
85
86
|
|
86
87
|
# Check if the object should be instantiated
|
@@ -4,14 +4,18 @@ module Rails
|
|
4
4
|
module GraphQL
|
5
5
|
# Returns the currently loaded version of the GraphQL as a <tt>Gem::Version</tt>.
|
6
6
|
def self.gem_version
|
7
|
-
Gem::Version.new
|
7
|
+
Gem::Version.new(version)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.version
|
11
|
+
VERSION::STRING
|
8
12
|
end
|
9
13
|
|
10
14
|
module VERSION
|
11
15
|
MAJOR = 1
|
12
16
|
MINOR = 0
|
13
17
|
TINY = 0
|
14
|
-
PRE = '
|
18
|
+
PRE = 'rc1'
|
15
19
|
|
16
20
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
17
21
|
end
|
data/lib/rails/graphql.rb
CHANGED
@@ -14,6 +14,7 @@ require 'rails/graphql/uri'
|
|
14
14
|
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
15
|
inflect.acronym 'GraphiQL'
|
16
16
|
inflect.acronym 'GraphQL'
|
17
|
+
inflect.acronym 'URL'
|
17
18
|
end
|
18
19
|
|
19
20
|
module Rails
|
@@ -165,7 +166,7 @@ module Rails
|
|
165
166
|
# so the check can be performed using a +inherited_collection+.
|
166
167
|
#
|
167
168
|
# If a +source+ is provided, then an +:attach+ event will be triggered
|
168
|
-
# for each directive on the
|
169
|
+
# for each directive on the given source element.
|
169
170
|
def directives_to_set(list, others = nil, event = nil, **xargs)
|
170
171
|
return if list.blank?
|
171
172
|
|
@@ -180,13 +181,14 @@ module Rails
|
|
180
181
|
The "#{item.class}" is not a valid directive.
|
181
182
|
MSG
|
182
183
|
|
183
|
-
|
184
|
-
|
184
|
+
check_location = location.present? && !item.locations.include?(location)
|
185
|
+
raise ArgumentError, (+<<~MSG).squish if check_location
|
186
|
+
You cannot use @#{item.gql_name} directive due to location restriction.
|
185
187
|
MSG
|
186
188
|
|
187
|
-
|
188
|
-
raise
|
189
|
-
|
189
|
+
check_uniqueness = !item.repeatable? && (others&.any?(item) || result.any?(item))
|
190
|
+
raise DuplicatedError, (+<<~MSG).squish if check_uniqueness
|
191
|
+
A @#{item.gql_name} directive have already been provided.
|
190
192
|
MSG
|
191
193
|
|
192
194
|
unless event.nil?
|
@@ -196,7 +198,7 @@ module Rails
|
|
196
198
|
item.validate!
|
197
199
|
rescue => error
|
198
200
|
raise StandardError, (+<<~MSG).squish
|
199
|
-
Unable to #{event.
|
201
|
+
Unable to #{event.event_name} the @#{item.gql_name} directive: #{error.message}
|
200
202
|
MSG
|
201
203
|
end
|
202
204
|
end
|
@@ -1 +1 @@
|
|
1
|
-
{"data":{"__schema":{"queryType":{"name":"_Query"},"mutationType":{"name":"_Mutation"},"subscriptionType":null,"types":[{"kind":"ENUM","name":"Episode","description":"One of the films in the Star Wars Trilogy","fields":[],"inputFields":[],"interfaces":[],"enumValues":[{"name":"NEW_HOPE","description":"Released in 1977.","isDeprecated":false,"deprecationReason":null},{"name":"EMPIRE","description":"Released in 1980.","isDeprecated":false,"deprecationReason":null},{"name":"JEDI","description":"Released in 1983.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":[]},{"kind":"INTERFACE","name":"Character","description":"A character in the Star Wars Trilogy","fields":[{"name":"id","description":"The id of the character","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the character","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the character, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"All secrets about their past","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[{"kind":"OBJECT","name":"Droid","ofType":null},{"kind":"OBJECT","name":"Human","ofType":null}]},{"kind":"OBJECT","name":"Human","description":"A humanoid creature in the Star Wars universe","fields":[{"name":"id","description":"The id of the human","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the human","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the human, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"Where are they from and how they came to be who they are","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"homePlanet","description":"The home planet of the human, or null if unknown","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"greeting","description":"A greeting phrase from this person to someone","args":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[{"kind":"INTERFACE","name":"Character","ofType":null}],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"Droid","description":"A mechanical creature in the Star Wars universe","fields":[{"name":"id","description":"The id of the droid","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the droid","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the droid, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"Construction date and the name of the designer","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryFunction","description":"The primary function of the droid","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[{"kind":"INTERFACE","name":"Character","ofType":null}],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"_Query","description":null,"fields":[{"name":"hero","description":"Find the hero of the whole saga","args":[{"name":"episode","description":"Return for a specific episode","type":{"kind":"ENUM","name":"Episode","ofType":null},"defaultValue":null}],"type":{"kind":"INTERFACE","name":"Character","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"human","description":"Find a human character","args":[{"name":"id","description":"ID of the human","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null}],"type":{"kind":"OBJECT","name":"Human","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"droid","description":"Find a droid character","args":[{"name":"id","description":"ID of the droid","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null}],"type":{"kind":"OBJECT","name":"Droid","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"_Mutation","description":null,"fields":[{"name":"changeHuman","description":"Change the episodes of a human and return a set of characters","args":[{"name":"id","description":"The ID of the human to be changed","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null},{"name":"episodes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"SCALAR","name":"Boolean","description":"The Boolean scalar type represents true or false.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"SCALAR","name":"String","description":"The String scalar type represents textual data, represented as UTF-8 character\nsequences.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"SCALAR","name":"Float","description":"The Float scalar type represents signed double-precision fractional values.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"SCALAR","name":"Int","description":"The Int scalar type represents a signed 32-bit numeric non-fractional value.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"SCALAR","name":"ID","description":"The ID scalar type represents a unique identifier and it is serialized in the same\nway as a String but it accepts both numeric and string based values as input.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"ENUM","name":"__DirectiveLocation","description":"The valid locations that a directive may be placed.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[{"name":"QUERY","description":"Mark as a executable directive usable on query objects.","isDeprecated":false,"deprecationReason":null},{"name":"MUTATION","description":"Mark as a executable directive usable on mutation objects.","isDeprecated":false,"deprecationReason":null},{"name":"SUBSCRIPTION","description":"Mark as a executable directive usable on subscription objects.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD","description":"Mark as a executable directive usable on field objects.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_DEFINITION","description":"Mark as a executable directive usable on fragment definition objects.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_SPREAD","description":"Mark as a executable directive usable on fragment spread objects.","isDeprecated":false,"deprecationReason":null},{"name":"INLINE_FRAGMENT","description":"Mark as a executable directive usable on inline fragment objects.","isDeprecated":false,"deprecationReason":null},{"name":"SCHEMA","description":"Mark as a type system directive usable on schema definitions.","isDeprecated":false,"deprecationReason":null},{"name":"SCALAR","description":"Mark as a type system directive usable on scalar definitions.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Mark as a type system directive usable on object definitions.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD_DEFINITION","description":"Mark as a type system directive usable on field definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ARGUMENT_DEFINITION","description":"Mark as a type system directive usable on argument definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Mark as a type system directive usable on interface definitions.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Mark as a type system directive usable on union definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Mark as a type system directive usable on enum definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM_VALUE","description":"Mark as a type system directive usable on enum value definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Mark as a type system directive usable on input object definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_FIELD_DEFINITION","description":"Mark as a type system directive usable on input field definitions.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":[]},{"kind":"ENUM","name":"__TypeKind","description":"The fundamental unit of any GraphQL Schema is the type.\nThis enum enlist all the valid base types.","fields":[],"inputFields":[],"interfaces":[],"enumValues":[{"name":"SCALAR","description":"Scalar types represent primitive leaf values in a GraphQL type system.\n","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Objects represent a list of named fields, each of which yield a value of a\nspecific type.\n","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Interfaces represent a list of named fields and their types.\n","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Unions represent an object that could be one of a list of GraphQL Object types.\n","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Enum types, like scalar types, also represent leaf values in a GraphQL\ntype system. However Enum types describe the set of possible values.\n","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Objects represent a list of named fields, each of which yield a value of\na specific type.\n","isDeprecated":false,"deprecationReason":null},{"name":"LIST","description":"A GraphQL list is a special collection type which declares the type of\neach item in the List (referred to as the item type of the list).\n","isDeprecated":false,"deprecationReason":null},{"name":"NON_NULL","description":"This type wraps an underlying type, and this type acts identically to that wrapped\ntype, with the exception that null is not a valid response for the wrapping type.\n","isDeprecated":false,"deprecationReason":null}],"possibleTypes":[]},{"kind":"OBJECT","name":"__Directive","description":"Directives provide a way to describe alternate runtime execution\nand type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution\nbehavior in ways field arguments will not suffice, such as conditionally\nincluding or skipping a field. Directives provide this by describing\nadditional information to the executor.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__DirectiveLocation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"__EnumValue","description":"One of the values of an Enum object. It is unique within the Enum set\nof values. It's a string representation, not a numeric representation,\nof a value kept as all caps (ie. ONE_VALUE).","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"__Field","description":"Fields are the elements that compose both Objects and Interfaces. Each\nfield in these other objects may contain arguments and always yields\na value of a specific type.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"__Schema","description":"A GraphQL service's collective type system capabilities are referred\nto as that service's \"schema\". A schema is defined in terms of the\ntypes and directives it supports as well as the root operation types\nfor each kind of operation: query, mutation, and subscription; this\ndetermines the place in the type system where those operations begin.","fields":[{"name":"types","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"queryType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"mutationType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subscriptionType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"directives","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Directive","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"__Type","description":"The fundamental unit of any GraphQL Schema is the type. There are six\nkinds of named type definitions in GraphQL, and two wrapping types.\n\nThe most basic type is a +Scalar+. A scalar represents a primitive value,\nlike a string or an integer.\n\n+Scalars+ and +Enums+ form the leaves in response trees; the intermediate\nlevels are +Object+ types, which define a set of fields.\n\nAn +Interface+ defines a list of fields; +Object+ types that implement\nthat interface are guaranteed to implement those fields.\n\nA +Union+ defines a list of possible types; similar to interfaces,\nwhenever the type system claims a union will be returned, one of the\npossible types will be returned.\n\nFinally, oftentimes it is useful to provide complex structs as inputs\nto GraphQL field arguments or variables; the +Input Object+ type allows\nthe schema to define exactly what data is expected.","fields":[{"name":"kind","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__TypeKind","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fields","description":"OBJECT and INTERFACE only","args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Field","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"interfaces","description":"OBJECT only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"possibleTypes","description":"INTERFACE and UNION only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"enumValues","description":"ENUM only","args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__EnumValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"inputFields","description":"INPUT_OBJECT only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"ofType","description":"NON_NULL and LIST only","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]},{"kind":"OBJECT","name":"__InputValue","description":"Alongside with scalars and enums, input value objects allow the user\nto provide values to arguments on fields and directives. Different\nfrom those, input values accepts a list of keyed values, instead of\na single value.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"defaultValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":[],"interfaces":[],"enumValues":[],"possibleTypes":[]}],"directives":[{"name":"include","description":"Allows for conditional inclusion during execution as described by the if argument.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"When false, the underlying element will be automatically marked as null.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}]},{"name":"skip","description":"Allows for conditional exclusion during execution as described by the if argument.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"When true, the underlying element will be automatically marked as null.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}]},{"name":"deprecated","description":"Indicate deprecated portions of a GraphQL service's schema, such as deprecated\nfields on a type or deprecated enum values.","locations":["FIELD_DEFINITION","ENUM_VALUE"],"args":[{"name":"reason","description":"Explain why the underlying element was marked as deprecated. If possible,\nindicate what element should be used instead. This description is formatted\nusing Markdown syntax (as specified by [CommonMark](http://commonmark.org/)).","type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}]}]}}}
|
1
|
+
{"data":{"__schema":{"queryType":{"name":"_Query"},"mutationType":{"name":"_Mutation"},"subscriptionType":null,"types":[{"kind":"OBJECT","name":"Human","description":"A humanoid creature in the Star Wars universe","specifiedByURL":null,"fields":[{"name":"id","description":"The id of the human","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the human, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"greeting","description":"A greeting phrase from this person to someone","args":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"homePlanet","description":"The home planet of the human, or null if unknown","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the human","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"Where are they from and how they came to be who they are","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Character","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"Character","description":"A character in the Star Wars Trilogy","specifiedByURL":null,"fields":[{"name":"id","description":"The id of the character","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the character, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the character","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"All secrets about their past","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Droid","ofType":null},{"kind":"OBJECT","name":"Human","ofType":null}]},{"kind":"ENUM","name":"Episode","description":"One of the films in the Star Wars Trilogy","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"NEW_HOPE","description":"Released in 1977.","isDeprecated":false,"deprecationReason":null},{"name":"EMPIRE","description":"Released in 1980.","isDeprecated":false,"deprecationReason":null},{"name":"JEDI","description":"Released in 1983.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Droid","description":"A mechanical creature in the Star Wars universe","specifiedByURL":null,"fields":[{"name":"id","description":"The id of the droid","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"appearsIn","description":"Which movies they appear in","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"friends","description":"The friends of the droid, or an empty list if they have none","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":"The name of the droid","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryFunction","description":"The primary function of the droid","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secretBackstory","description":"Construction date and the name of the designer","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Character","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"_Query","description":null,"specifiedByURL":null,"fields":[{"name":"droid","description":"Find a droid character","args":[{"name":"id","description":"ID of the droid","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null}],"type":{"kind":"OBJECT","name":"Droid","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"hero","description":"Find the hero of the whole saga","args":[{"name":"episode","description":"Return for a specific episode","type":{"kind":"ENUM","name":"Episode","ofType":null},"defaultValue":null}],"type":{"kind":"INTERFACE","name":"Character","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"human","description":"Find a human character","args":[{"name":"id","description":"ID of the human","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null}],"type":{"kind":"OBJECT","name":"Human","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"_Mutation","description":null,"specifiedByURL":null,"fields":[{"name":"changeHuman","description":"Change the episodes of a human and return a set of characters","args":[{"name":"id","description":"The ID of the human to be changed","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null},{"name":"episodes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Episode","ofType":null}}},"defaultValue":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INTERFACE","name":"Character","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Boolean","description":"The Boolean scalar type represents true or false.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"String","description":"The String scalar type represents textual data, represented as UTF-8 character\nsequences.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Float","description":"The Float scalar type represents signed double-precision fractional values.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Int","description":"The Int scalar type represents a signed 32-bit numeric non-fractional value.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"ID","description":"The ID scalar type represents a unique identifier and it is serialized in the same\nway as a String but it accepts both numeric and string based values as input.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"__TypeKind","description":"The fundamental unit of any GraphQL Schema is the type.\nThis enum enlist all the valid base types.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SCALAR","description":"Scalar types represent primitive leaf values in a GraphQL type system.\n","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Objects represent a list of named fields, each of which yield a value of a\nspecific type.\n","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Interfaces represent a list of named fields and their types.\n","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Unions represent an object that could be one of a list of GraphQL Object types.\n","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Enum types, like scalar types, also represent leaf values in a GraphQL\ntype system. However Enum types describe the set of possible values.\n","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Objects represent a list of named fields, each of which yield a value of\na specific type.\n","isDeprecated":false,"deprecationReason":null},{"name":"LIST","description":"A GraphQL list is a special collection type which declares the type of\neach item in the List (referred to as the item type of the list).\n","isDeprecated":false,"deprecationReason":null},{"name":"NON_NULL","description":"This type wraps an underlying type, and this type acts identically to that wrapped\ntype, with the exception that null is not a valid response for the wrapping type.\n","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"__DirectiveLocation","description":"The valid locations that a directive may be placed.","specifiedByURL":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"QUERY","description":"Mark as a executable directive usable on query objects.","isDeprecated":false,"deprecationReason":null},{"name":"MUTATION","description":"Mark as a executable directive usable on mutation objects.","isDeprecated":false,"deprecationReason":null},{"name":"SUBSCRIPTION","description":"Mark as a executable directive usable on subscription objects.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD","description":"Mark as a executable directive usable on field objects.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_DEFINITION","description":"Mark as a executable directive usable on fragment definition objects.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_SPREAD","description":"Mark as a executable directive usable on fragment spread objects.","isDeprecated":false,"deprecationReason":null},{"name":"INLINE_FRAGMENT","description":"Mark as a executable directive usable on inline fragment objects.","isDeprecated":false,"deprecationReason":null},{"name":"SCHEMA","description":"Mark as a type system directive usable on schema definitions.","isDeprecated":false,"deprecationReason":null},{"name":"SCALAR","description":"Mark as a type system directive usable on scalar definitions.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Mark as a type system directive usable on object definitions.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD_DEFINITION","description":"Mark as a type system directive usable on field definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ARGUMENT_DEFINITION","description":"Mark as a type system directive usable on argument definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Mark as a type system directive usable on interface definitions.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Mark as a type system directive usable on union definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Mark as a type system directive usable on enum definitions.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM_VALUE","description":"Mark as a type system directive usable on enum value definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Mark as a type system directive usable on input object definitions.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_FIELD_DEFINITION","description":"Mark as a type system directive usable on input field definitions.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"__InputValue","description":"Arguments provided to Fields or Directives and the input fields of an\nInputObject are represented as Input Values which describe their type\nand optionally a default value.","specifiedByURL":null,"fields":[{"name":"defaultValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Field","description":"Fields are the elements that compose both Objects and Interfaces. Each\nfield in these other objects may contain arguments and always yields\na value of a specific type.","specifiedByURL":null,"fields":[{"name":"args","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__EnumValue","description":"One of the values of an Enum object. It is unique within the Enum set\nof values. It's a string representation, not a numeric representation,\nof a value kept as all caps (ie. ONE_VALUE).","specifiedByURL":null,"fields":[{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Directive","description":"Directives provide a way to describe alternate runtime execution\nand type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution\nbehavior in ways field arguments will not suffice, such as conditionally\nincluding or skipping a field. Directives provide this by describing\nadditional information to the executor.","specifiedByURL":null,"fields":[{"name":"args","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isRepeatable","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__DirectiveLocation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Type","description":"The fundamental unit of any GraphQL Schema is the type. There are six\nkinds of named type definitions in GraphQL, and two wrapping types.\n\nThe most basic type is a +Scalar+. A scalar represents a primitive value,\nlike a string or an integer.\n\n+Scalars+ and +Enums+ form the leaves in response trees; the intermediate\nlevels are +Object+ types, which define a set of fields.\n\nAn +Interface+ defines a list of fields; +Object+ types that implement\nthat interface are guaranteed to implement those fields.\n\nA +Union+ defines a list of possible types; similar to interfaces,\nwhenever the type system claims a union will be returned, one of the\npossible types will be returned.\n\nFinally, oftentimes it is useful to provide complex structs as inputs\nto GraphQL field arguments or variables; the +Input Object+ type allows\nthe schema to define exactly what data is expected.","specifiedByURL":null,"fields":[{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"enumValues","description":"ENUM only","args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__EnumValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"fields","description":"OBJECT and INTERFACE only","args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false"}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Field","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"inputFields","description":"INPUT_OBJECT only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"interfaces","description":"OBJECT only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"kind","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__TypeKind","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ofType","description":"NON_NULL and LIST only","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"possibleTypes","description":"INTERFACE and UNION only","args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"specifiedByURL","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Schema","description":"A GraphQL service's collective type system capabilities are referred\nto as that service's \"schema\". A schema is defined in terms of the\ntypes and directives it supports as well as the root operation types\nfor each kind of operation: query, mutation, and subscription; this\ndetermines the place in the type system where those operations begin.","specifiedByURL":null,"fields":[{"name":"directives","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Directive","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"mutationType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"queryType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subscriptionType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"types","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null}],"directives":[{"name":"specifiedBy","description":"A built-in directive used within the type system definition language to provide\na scalar specification URL for specifying the behavior of custom scalar types.","locations":["SCALAR"],"args":[{"name":"url","description":"Point to a human-readable specification of the data format.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null}],"isRepeatable":false},{"name":"skip","description":"Allows for conditional exclusion during execution as described by the if argument.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"When true, the underlying element will be automatically marked as null.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}],"isRepeatable":false},{"name":"include","description":"Allows for conditional inclusion during execution as described by the if argument.","locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"When false, the underlying element will be automatically marked as null.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null}],"isRepeatable":false},{"name":"deprecated","description":"Indicate deprecated portions of a GraphQL service's schema, such as deprecated\nfields on a type or deprecated enum values.","locations":["FIELD_DEFINITION","ENUM_VALUE"],"args":[{"name":"reason","description":"Explain why the underlying element was marked as deprecated. If possible,\nindicate what element should be used instead. This description is formatted\nusing Markdown syntax (as specified by [CommonMark](http://commonmark.org/)).","type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null}],"isRepeatable":false}]}}}
|
@@ -13,6 +13,7 @@ query IntrospectionQuery {
|
|
13
13
|
args {
|
14
14
|
...InputValue
|
15
15
|
}
|
16
|
+
isRepeatable
|
16
17
|
}
|
17
18
|
}
|
18
19
|
}
|
@@ -21,6 +22,7 @@ fragment FullType on __Type {
|
|
21
22
|
kind
|
22
23
|
name
|
23
24
|
description
|
25
|
+
specifiedByURL
|
24
26
|
fields(includeDeprecated: true) {
|
25
27
|
name
|
26
28
|
description
|