module GraphQL::Schema::Member::HasAstNode
Attributes
Public Class Methods
(singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) → void
Source
# File lib/graphql/schema/member/has_ast_node.rb, line 9 def self.extended(child_cls) super child_cls.ast_node = nil end
Calls superclass method
Public Instance Methods
(?GraphQL::Language::Nodes::AbstractNode? new_ast_node) → GraphQL::Language::Nodes::AbstractNode?
Source
# File lib/graphql/schema/member/has_ast_node.rb, line 23 def ast_node(new_ast_node = nil) if new_ast_node @ast_node = new_ast_node #: GraphQL::Language::Nodes::AbstractNode? elsif defined?(@ast_node) @ast_node else nil end end
If this schema was parsed from a .graphql file (or other SDL), this is the AST node that defined this part of the schema.
(singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) → void
Source
# File lib/graphql/schema/member/has_ast_node.rb, line 15 def inherited(child_cls) super child_cls.ast_node = nil end
Calls superclass method