Module: GraphQL::Schema::Member::HasAstNode
- Included in:
- GraphQL::Schema, Argument, EnumValue, Field, Interface::DefinitionMethods, GraphQL::Schema::Member
- Defined in:
- lib/graphql/schema/member/has_ast_node.rb
Instance Attribute Summary collapse
-
#ast_node(new_ast_node = nil) ⇒ Object
If this schema was parsed from a
.graphqlfile (or other SDL), this is the AST node that defined this part of the schema.
Class Method Summary collapse
-
.extended(child_cls) ⇒ Object
: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void.
Instance Method Summary collapse
-
#inherited(child_cls) ⇒ Object
: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void.
Instance Attribute Details
#ast_node(new_ast_node = nil) ⇒ Object
If this schema was parsed from a .graphql file (or other SDL),
this is the AST node that defined this part of the schema.
: (?GraphQL::Language::Nodes::AbstractNode? new_ast_node) -> GraphQL::Language::Nodes::AbstractNode?
23 24 25 26 27 28 29 30 31 |
# 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 |
Class Method Details
.extended(child_cls) ⇒ Object
: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void
9 10 11 12 |
# File 'lib/graphql/schema/member/has_ast_node.rb', line 9 def self.extended(child_cls) super child_cls.ast_node = nil end |
Instance Method Details
#inherited(child_cls) ⇒ Object
: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void
15 16 17 18 |
# File 'lib/graphql/schema/member/has_ast_node.rb', line 15 def inherited(child_cls) super child_cls.ast_node = nil end |