rails-graphql 1.0.0.beta → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/ext/gql_parser.c +1 -16
  3. data/ext/gql_parser.h +21 -0
  4. data/ext/shared.c +0 -5
  5. data/ext/shared.h +6 -6
  6. data/lib/generators/graphql/channel_generator.rb +27 -0
  7. data/lib/generators/graphql/controller_generator.rb +9 -4
  8. data/lib/generators/graphql/install_generator.rb +49 -0
  9. data/lib/generators/graphql/schema_generator.rb +9 -4
  10. data/lib/generators/graphql/templates/channel.erb +7 -0
  11. data/lib/generators/graphql/templates/config.rb +97 -0
  12. data/lib/generators/graphql/templates/controller.erb +2 -0
  13. data/lib/generators/graphql/templates/schema.erb +5 -3
  14. data/lib/gql_parser.so +0 -0
  15. data/lib/rails/graphql/alternative/field_set.rb +12 -0
  16. data/lib/rails/graphql/alternative/query.rb +13 -8
  17. data/lib/rails/graphql/alternative/subscription.rb +2 -1
  18. data/lib/rails/graphql/alternative.rb +4 -0
  19. data/lib/rails/graphql/argument.rb +5 -3
  20. data/lib/rails/graphql/callback.rb +10 -8
  21. data/lib/rails/graphql/collectors/hash_collector.rb +12 -1
  22. data/lib/rails/graphql/collectors/json_collector.rb +21 -0
  23. data/lib/rails/graphql/config.rb +86 -59
  24. data/lib/rails/graphql/directive/include_directive.rb +0 -1
  25. data/lib/rails/graphql/directive/skip_directive.rb +0 -1
  26. data/lib/rails/graphql/directive/specified_by_directive.rb +24 -0
  27. data/lib/rails/graphql/directive.rb +31 -25
  28. data/lib/rails/graphql/event.rb +7 -6
  29. data/lib/rails/graphql/field/authorized_field.rb +0 -5
  30. data/lib/rails/graphql/field/input_field.rb +0 -5
  31. data/lib/rails/graphql/field/mutation_field.rb +5 -6
  32. data/lib/rails/graphql/field/output_field.rb +13 -2
  33. data/lib/rails/graphql/field/proxied_field.rb +6 -6
  34. data/lib/rails/graphql/field/resolved_field.rb +1 -1
  35. data/lib/rails/graphql/field/subscription_field.rb +35 -52
  36. data/lib/rails/graphql/field/typed_field.rb +26 -2
  37. data/lib/rails/graphql/field.rb +20 -19
  38. data/lib/rails/graphql/global_id.rb +5 -1
  39. data/lib/rails/graphql/helpers/inherited_collection/array.rb +1 -0
  40. data/lib/rails/graphql/helpers/inherited_collection/base.rb +3 -1
  41. data/lib/rails/graphql/helpers/inherited_collection/hash.rb +2 -1
  42. data/lib/rails/graphql/helpers/registerable.rb +1 -1
  43. data/lib/rails/graphql/helpers/with_arguments.rb +3 -2
  44. data/lib/rails/graphql/helpers/with_assignment.rb +5 -5
  45. data/lib/rails/graphql/helpers/with_callbacks.rb +3 -3
  46. data/lib/rails/graphql/helpers/with_description.rb +10 -8
  47. data/lib/rails/graphql/helpers/with_directives.rb +5 -1
  48. data/lib/rails/graphql/helpers/with_events.rb +1 -0
  49. data/lib/rails/graphql/helpers/with_fields.rb +30 -24
  50. data/lib/rails/graphql/helpers/with_name.rb +3 -2
  51. data/lib/rails/graphql/helpers/with_schema_fields.rb +75 -51
  52. data/lib/rails/graphql/introspection.rb +1 -1
  53. data/lib/rails/graphql/railtie.rb +3 -2
  54. data/lib/rails/graphql/railties/app/base_channel.rb +10 -0
  55. data/lib/rails/graphql/railties/app/base_controller.rb +12 -0
  56. data/lib/rails/graphql/railties/app/views/_cable.js.erb +56 -0
  57. data/lib/rails/graphql/railties/app/views/_fetch.js.erb +20 -0
  58. data/lib/rails/graphql/railties/app/views/graphiql.html.erb +101 -0
  59. data/lib/rails/graphql/railties/base_generator.rb +3 -9
  60. data/lib/rails/graphql/railties/channel.rb +8 -8
  61. data/lib/rails/graphql/railties/controller.rb +51 -26
  62. data/lib/rails/graphql/request/arguments.rb +2 -1
  63. data/lib/rails/graphql/request/backtrace.rb +31 -10
  64. data/lib/rails/graphql/request/component/field.rb +15 -8
  65. data/lib/rails/graphql/request/component/fragment.rb +13 -7
  66. data/lib/rails/graphql/request/component/operation/subscription.rb +4 -6
  67. data/lib/rails/graphql/request/component/operation.rb +12 -5
  68. data/lib/rails/graphql/request/component/spread.rb +13 -4
  69. data/lib/rails/graphql/request/component/typename.rb +1 -1
  70. data/lib/rails/graphql/request/component.rb +2 -0
  71. data/lib/rails/graphql/request/context.rb +1 -1
  72. data/lib/rails/graphql/request/event.rb +6 -2
  73. data/lib/rails/graphql/request/helpers/directives.rb +1 -0
  74. data/lib/rails/graphql/request/helpers/selection_set.rb +10 -4
  75. data/lib/rails/graphql/request/helpers/value_writers.rb +8 -5
  76. data/lib/rails/graphql/request/prepared_data.rb +3 -1
  77. data/lib/rails/graphql/request/steps/organizable.rb +1 -1
  78. data/lib/rails/graphql/request/steps/preparable.rb +1 -1
  79. data/lib/rails/graphql/request/steps/resolvable.rb +1 -1
  80. data/lib/rails/graphql/request/strategy/sequenced_strategy.rb +3 -3
  81. data/lib/rails/graphql/request/strategy.rb +18 -4
  82. data/lib/rails/graphql/request/subscription.rb +18 -16
  83. data/lib/rails/graphql/request.rb +71 -41
  84. data/lib/rails/graphql/schema.rb +39 -86
  85. data/lib/rails/graphql/shortcuts.rb +11 -5
  86. data/lib/rails/graphql/source/active_record/builders.rb +22 -24
  87. data/lib/rails/graphql/source/active_record_source.rb +96 -34
  88. data/lib/rails/graphql/source/base.rb +13 -40
  89. data/lib/rails/graphql/source/builder.rb +14 -22
  90. data/lib/rails/graphql/source/scoped_arguments.rb +10 -4
  91. data/lib/rails/graphql/source.rb +31 -38
  92. data/lib/rails/graphql/subscription/provider/action_cable.rb +10 -9
  93. data/lib/rails/graphql/subscription/provider/base.rb +6 -5
  94. data/lib/rails/graphql/subscription/store/base.rb +5 -9
  95. data/lib/rails/graphql/subscription/store/memory.rb +18 -9
  96. data/lib/rails/graphql/type/creator.rb +198 -0
  97. data/lib/rails/graphql/type/enum.rb +17 -9
  98. data/lib/rails/graphql/type/input.rb +30 -7
  99. data/lib/rails/graphql/type/interface.rb +15 -4
  100. data/lib/rails/graphql/type/object/directive_object.rb +6 -5
  101. data/lib/rails/graphql/type/object/input_value_object.rb +3 -4
  102. data/lib/rails/graphql/type/object/type_object.rb +40 -13
  103. data/lib/rails/graphql/type/object.rb +11 -6
  104. data/lib/rails/graphql/type/scalar/binary_scalar.rb +2 -0
  105. data/lib/rails/graphql/type/scalar/date_scalar.rb +2 -0
  106. data/lib/rails/graphql/type/scalar/date_time_scalar.rb +2 -0
  107. data/lib/rails/graphql/type/scalar/decimal_scalar.rb +2 -0
  108. data/lib/rails/graphql/type/scalar/json_scalar.rb +3 -1
  109. data/lib/rails/graphql/type/scalar/time_scalar.rb +3 -1
  110. data/lib/rails/graphql/type/scalar.rb +2 -2
  111. data/lib/rails/graphql/type/union.rb +7 -2
  112. data/lib/rails/graphql/type.rb +10 -2
  113. data/lib/rails/graphql/type_map.rb +20 -7
  114. data/lib/rails/graphql/uri.rb +5 -4
  115. data/lib/rails/graphql/version.rb +6 -2
  116. data/lib/rails/graphql.rb +11 -8
  117. data/test/assets/introspection-mem.txt +1 -1
  118. data/test/assets/introspection.gql +2 -0
  119. data/test/assets/mem.gql +74 -60
  120. data/test/assets/mysql.gql +69 -55
  121. data/test/assets/sqlite.gql +78 -64
  122. data/test/assets/translate.gql +50 -39
  123. data/test/config.rb +2 -1
  124. data/test/graphql/schema_test.rb +2 -31
  125. data/test/graphql/source_test.rb +1 -11
  126. data/test/graphql/type/interface_test.rb +8 -5
  127. data/test/graphql/type/object_test.rb +8 -2
  128. data/test/graphql/type_map_test.rb +13 -16
  129. data/test/integration/global_id_test.rb +4 -4
  130. data/test/integration/memory/star_wars_validation_test.rb +2 -2
  131. data/test/integration/mysql/star_wars_introspection_test.rb +1 -1
  132. data/test/integration/resolver_precedence_test.rb +1 -1
  133. data/test/integration/schemas/memory.rb +3 -4
  134. data/test/integration/sqlite/star_wars_global_id_test.rb +27 -21
  135. data/test/integration/sqlite/star_wars_introspection_test.rb +1 -1
  136. data/test/integration/translate_test.rb +26 -14
  137. metadata +22 -9
@@ -40,9 +40,14 @@ module Rails
40
40
  # Plain objects can check if a given value is a valid member
41
41
  def valid_member?(value)
42
42
  return true if valid_assignment?(value)
43
- checker = value.is_a?(::Hash) ? :key? : :respond_to?
44
- value = value.with_indifferent_access if value.is_a?(::Hash)
45
- fields.values.all? { |field| value.public_send(checker, field.method_name) }
43
+
44
+ check_hash = value.is_a?(::Hash)
45
+ checker = check_hash ? :key? : :respond_to?
46
+
47
+ fields.values.all? do |field|
48
+ value.public_send(checker, field.method_name) ||
49
+ (check_hash && (field.null? || value.key?(field.gql_name)))
50
+ end
46
51
  end
47
52
 
48
53
  # Check if the other type is equivalent, by checking if the other is
@@ -52,7 +57,7 @@ module Rails
52
57
  end
53
58
 
54
59
  # Use this method to assign interfaces to the object
55
- def implements(*others)
60
+ def implements(*others, import_fields: true)
56
61
  return if others.blank?
57
62
 
58
63
  current = all_interfaces&.dup
@@ -60,7 +65,7 @@ module Rails
60
65
  item = find_interface!(item)
61
66
  next if current&.include?(item) || interfaces.include?(item)
62
67
 
63
- item.implemented(self)
68
+ item.implemented(self, import_fields: import_fields)
64
69
  interfaces << item
65
70
  end
66
71
  end
@@ -72,7 +77,7 @@ module Rails
72
77
 
73
78
  def inspect
74
79
  return super if self.eql?(Type::Object)
75
- fields = @fields.values.map(&:inspect)
80
+ fields = @fields&.values&.map(&:inspect)
76
81
  fields = fields.presence && +" {#{fields.join(', ')}}"
77
82
 
78
83
  directives = inspect_directives
@@ -15,6 +15,8 @@ module Rails
15
15
  Normally used to share files and uploads.
16
16
  DESC
17
17
 
18
+ use :specified_by, url: 'https://www.rfc-editor.org/rfc/rfc3548'
19
+
18
20
  class << self
19
21
  def as_json(value)
20
22
  Base64.encode64(value.to_s).chomp
@@ -7,6 +7,8 @@ module Rails
7
7
  class Scalar::DateScalar < Scalar
8
8
  desc 'The Date scalar type represents a ISO 8601 string value.'
9
9
 
10
+ use :specified_by, url: 'https://en.wikipedia.org/wiki/ISO_8601'
11
+
10
12
  class << self
11
13
  def valid_input?(value)
12
14
  super && !!Date.iso8601(value)
@@ -9,6 +9,8 @@ module Rails
9
9
 
10
10
  desc 'The DateTime scalar type represents a ISO 8601 string value.'
11
11
 
12
+ use :specified_by, url: 'https://en.wikipedia.org/wiki/ISO_8601'
13
+
12
14
  class << self
13
15
  def valid_input?(value)
14
16
  super && !!(Time.iso8601(value) rescue false)
@@ -12,6 +12,8 @@ module Rails
12
12
  The values are exchange as string.
13
13
  DESC
14
14
 
15
+ use :specified_by, url: 'https://en.wikipedia.org/wiki/IEEE_754-2008_revision'
16
+
15
17
  class << self
16
18
  def valid_input?(value)
17
19
  super && value.match?(/\A[+-]?\d+\.\d+\z/)
@@ -9,9 +9,11 @@ module Rails
9
9
 
10
10
  desc <<~DESC
11
11
  The JSON scalar type represents an unstructured JSON data
12
- with all its available kyes and values.
12
+ with all its available keys and values.
13
13
  DESC
14
14
 
15
+ use :specified_by, url: 'https://www.rfc-editor.org/rfc/rfc8259'
16
+
15
17
  class << self
16
18
  def valid_input?(value)
17
19
  valid_token?(value, :hash) || value.is_a?(::Hash)
@@ -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 miliseconds.
13
+ minutes, seconds, and milliseconds.
14
14
  MSG
15
15
 
16
+ use :specified_by, url: 'https://en.wikipedia.org/wiki/ISO_8601'
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
@@ -48,7 +48,7 @@ module Rails
48
48
 
49
49
  # Transforms the given value to its representation in a JSON string
50
50
  def to_json(value)
51
- as_json(value)&.inspect
51
+ as_json(value).inspect
52
52
  end
53
53
 
54
54
  # Transforms the given value to its representation in a Hash object
@@ -56,7 +56,7 @@ module Rails
56
56
  value.to_s
57
57
  end
58
58
 
59
- # Turn a user input of this given type into an ruby object
59
+ # Turn a user input of this given type into a Ruby object
60
60
  def deserialize(value)
61
61
  value.is_a?(::GQLParser::Token) ? as_json(value) : value
62
62
  end
@@ -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.lazy.map { |item| item.try(:base_type) }.uniq.force
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? ? [members.first.base_type] : VALID_MEMBER_TYPES
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
@@ -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 instanteate the type if necessary
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
- redefine_singleton_method(:kind) { options[:kind] } if options.key?(:kind)
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,10 @@ module Rails
17
16
  # The cache stores in the following structure:
18
17
  # Namespace -> BaseClass -> ItemKey -> Item
19
18
  class TypeMap
20
- FILTER_REGISTER_TRACE = /((inherited|initialize)'$|schema\.rb:\d+)/.freeze
19
+ extend ActiveSupport::Autoload
21
20
 
22
- NsList = Class.new(Set)
21
+ FILTER_REGISTER_TRACE = /((inherited|initialize)'$|schema\.rb:\d+)/.freeze
22
+ NESTED_MODULE = Type::Creator::NESTED_MODULE
23
23
 
24
24
  # Store all the base classes that are managed by the Type Map
25
25
  mattr_accessor :base_classes, instance_writer: false,
@@ -98,6 +98,8 @@ module Rails
98
98
  ns = @module_namespaces[mod]
99
99
  break ns unless ns.nil?
100
100
  end
101
+ rescue ::NameError
102
+ # If any module parent can't be found, there is no much we can do
101
103
  end
102
104
 
103
105
  # Register a given object, which must be a class where the namespaces and
@@ -114,7 +116,8 @@ module Rails
114
116
  object_name = object.gql_name
115
117
  object_key = object.to_sym
116
118
  alias_proc = -> do
117
- fetch(object_key, base_class: base_class, namespaces: object_base, exclusive: true)
119
+ value = dig(object_base, base_class, object_key)
120
+ value.is_a?(Proc) ? value.call : value
118
121
  end
119
122
 
120
123
  # TODO Warn when the base key is being assigned to a different object
@@ -149,8 +152,16 @@ module Rails
149
152
  namespaces << :base if namespaces.empty?
150
153
  base_class = find_base_class(object)
151
154
 
152
- @objects -= 1
153
- @index[namespaces.first][base_class][object.to_sym] = nil
155
+ if object.kind != :source
156
+ @index[namespaces.first][base_class][object.to_sym] = nil
157
+ @objects -= 1
158
+ end
159
+
160
+ return unless object.const_defined?(NESTED_MODULE, false)
161
+
162
+ nested_mod = object.const_get(NESTED_MODULE, false)
163
+ nested_mod.constants.each { |name| nested_mod.const_get(name, false).unregister! }
164
+ object.send(:remove_const, NESTED_MODULE)
154
165
  end
155
166
  end
156
167
 
@@ -201,6 +212,7 @@ module Rails
201
212
  # Find the given key or name inside the base class either on the given
202
213
  # namespace or in the base +:base+ namespace
203
214
  def fetch(key_or_name, prevent_register: nil, **xargs)
215
+ prevent_register = true if @pending.blank?
204
216
  if prevent_register != true
205
217
  items = prevent_register == true ? nil : ::Array.wrap(prevent_register)
206
218
  skip_register << items.to_set
@@ -219,7 +231,7 @@ module Rails
219
231
  end
220
232
  end
221
233
  ensure
222
- skip_register.pop
234
+ skip_register.pop if prevent_register != true
223
235
  end
224
236
 
225
237
  # Checks if a given key or name is already defined under the same base
@@ -413,6 +425,7 @@ module Rails
413
425
  "#{__dir__}/directive/deprecated_directive",
414
426
  "#{__dir__}/directive/include_directive",
415
427
  "#{__dir__}/directive/skip_directive",
428
+ "#{__dir__}/directive/specified_by_directive",
416
429
  ]
417
430
  end
418
431
 
@@ -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 VERSION::STRING
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 = 'beta'
18
+ PRE = 'rc2'
15
19
 
16
20
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
17
21
  end
data/lib/rails/graphql.rb CHANGED
@@ -7,6 +7,7 @@ require 'active_support'
7
7
 
8
8
  require 'active_support/core_ext/module/attribute_accessors_per_thread'
9
9
  require 'active_support/core_ext/string/strip'
10
+ require 'active_support/core_ext/enumerable'
10
11
 
11
12
  require 'rails/graphql/version'
12
13
  require 'rails/graphql/uri'
@@ -14,6 +15,7 @@ require 'rails/graphql/uri'
14
15
  ActiveSupport::Inflector.inflections(:en) do |inflect|
15
16
  inflect.acronym 'GraphiQL'
16
17
  inflect.acronym 'GraphQL'
18
+ inflect.acronym 'URL'
17
19
  end
18
20
 
19
21
  module Rails
@@ -39,7 +41,7 @@ module Rails
39
41
  # * <tt>Directives:</tt> A directive definition belongs to the introspection
40
42
  # and is handled in the Singleton extent. They are handled as instance
41
43
  # whenever a definition or an execution uses them.
42
- # * <tt>Fields:</tt> Many other types and helper containers holds a serie of
44
+ # * <tt>Fields:</tt> Many other types and helper containers holds a series of
43
45
  # fields, which means that fields with the same name will probably behave
44
46
  # differently.
45
47
  module GraphQL
@@ -165,7 +167,7 @@ module Rails
165
167
  # so the check can be performed using a +inherited_collection+.
166
168
  #
167
169
  # If a +source+ is provided, then an +:attach+ event will be triggered
168
- # for each directive on the givem source element.
170
+ # for each directive on the given source element.
169
171
  def directives_to_set(list, others = nil, event = nil, **xargs)
170
172
  return if list.blank?
171
173
 
@@ -180,13 +182,14 @@ module Rails
180
182
  The "#{item.class}" is not a valid directive.
181
183
  MSG
182
184
 
183
- raise DuplicatedError, (+<<~MSG).squish if others&.any?(item) || result.any?(item)
184
- A @#{item.gql_name} directive have already been provided.
185
+ check_location = location.present? && !item.locations.include?(location)
186
+ raise ArgumentError, (+<<~MSG).squish if check_location
187
+ You cannot use @#{item.gql_name} directive due to location restriction.
185
188
  MSG
186
189
 
187
- invalid_location = location.present? && !item.locations.include?(location)
188
- raise ArgumentError, (+<<~MSG).squish if invalid_location
189
- You cannot use @#{item.gql_name} directive due to location restriction.
190
+ check_uniqueness = !item.repeatable? && (others&.any?(item) || result.any?(item))
191
+ raise DuplicatedError, (+<<~MSG).squish if check_uniqueness
192
+ A @#{item.gql_name} directive have already been provided.
190
193
  MSG
191
194
 
192
195
  unless event.nil?
@@ -196,7 +199,7 @@ module Rails
196
199
  item.validate!
197
200
  rescue => error
198
201
  raise StandardError, (+<<~MSG).squish
199
- Unable to #{event.name} the @#{item.gql_name} directive: #{error.message}
202
+ Unable to #{event.event_name} the @#{item.gql_name} directive: #{error.message}
200
203
  MSG
201
204
  end
202
205
  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