lib/graphql/language/nodes.rb in graphql-1.8.4 vs lib/graphql/language/nodes.rb in graphql-1.8.5
- old
+ new
@@ -401,10 +401,27 @@
end
alias :children :directives
end
+ class SchemaExtension < AbstractNode
+ attr_accessor :query, :mutation, :subscription, :directives
+
+ def initialize_node(query: nil, mutation: nil, subscription: nil, directives: [])
+ @query = query
+ @mutation = mutation
+ @subscription = subscription
+ @directives = directives
+ end
+
+ def scalars
+ [query, mutation, subscription]
+ end
+
+ alias :children :directives
+ end
+
class ScalarTypeDefinition < AbstractNode
include Scalars::Name
attr_accessor :name, :directives, :description
alias :children :directives
@@ -414,10 +431,20 @@
@directives = directives
@description = description
end
end
+ class ScalarTypeExtension < AbstractNode
+ attr_accessor :name, :directives
+ alias :children :directives
+
+ def initialize_node(name:, directives: [])
+ @name = name
+ @directives = directives
+ end
+ end
+
class ObjectTypeDefinition < AbstractNode
include Scalars::Name
attr_accessor :name, :interfaces, :fields, :directives, :description
@@ -432,10 +459,25 @@
def children
interfaces + fields + directives
end
end
+ class ObjectTypeExtension < AbstractNode
+ attr_accessor :name, :interfaces, :fields, :directives
+
+ def initialize_node(name:, interfaces:, fields:, directives: [])
+ @name = name
+ @interfaces = interfaces || []
+ @directives = directives
+ @fields = fields
+ end
+
+ def children
+ interfaces + fields + directives
+ end
+ end
+
class InputValueDefinition < AbstractNode
attr_accessor :name, :type, :default_value, :directives,:description
alias :children :directives
def initialize_node(name:, type:, default_value: nil, directives: [], description: nil)
@@ -486,10 +528,24 @@
def children
fields + directives
end
end
+ class InterfaceTypeExtension < AbstractNode
+ attr_accessor :name, :fields, :directives
+
+ def initialize_node(name:, fields:, directives: [])
+ @name = name
+ @fields = fields
+ @directives = directives
+ end
+
+ def children
+ fields + directives
+ end
+ end
+
class UnionTypeDefinition < AbstractNode
include Scalars::Name
attr_accessor :name, :types, :directives, :description
@@ -503,10 +559,24 @@
def children
types + directives
end
end
+ class UnionTypeExtension < AbstractNode
+ attr_accessor :name, :types, :directives
+
+ def initialize_node(name:, types:, directives: [])
+ @name = name
+ @types = types
+ @directives = directives
+ end
+
+ def children
+ types + directives
+ end
+ end
+
class EnumTypeDefinition < AbstractNode
include Scalars::Name
attr_accessor :name, :values, :directives, :description
@@ -520,10 +590,24 @@
def children
values + directives
end
end
+ class EnumTypeExtension < AbstractNode
+ attr_accessor :name, :values, :directives
+
+ def initialize_node(name:, values:, directives: [])
+ @name = name
+ @values = values
+ @directives = directives
+ end
+
+ def children
+ values + directives
+ end
+ end
+
class EnumValueDefinition < AbstractNode
include Scalars::Name
attr_accessor :name, :directives, :description
alias :children :directives
@@ -543,9 +627,23 @@
def initialize_node(name:, fields:, directives: [], description: nil)
@name = name
@fields = fields
@directives = directives
@description = description
+ end
+
+ def children
+ fields + directives
+ end
+ end
+
+ class InputObjectTypeExtension < AbstractNode
+ attr_accessor :name, :fields, :directives
+
+ def initialize_node(name:, fields:, directives: [])
+ @name = name
+ @fields = fields
+ @directives = directives
end
def children
fields + directives
end