module GraphQL::Schema::Member::HasAstNode
Attributes
Public Class Methods
Source
# File lib/graphql/schema/member/has_ast_node.rb, line 7 def self.extended(child_cls) super child_cls.ast_node = nil end
Calls superclass method
Public Instance Methods
# File lib/graphql/schema/member/has_ast_node.rb, line 19 def ast_node(new_ast_node = nil) if new_ast_node @ast_node = new_ast_node 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.
Source
# File lib/graphql/schema/member/has_ast_node.rb, line 12 def inherited(child_cls) super child_cls.ast_node = nil end
Calls superclass method