Class: GraphQL::Client::RenameNodeVisitor
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
GraphQL::Language::Visitor
|
|
Instance Chain:
self,
GraphQL::Language::Visitor
|
|
Inherits: |
GraphQL::Language::Visitor
|
Defined in: | lib/graphql/client.rb |
Class Method Summary
- .new(document, definitions:) ⇒ RenameNodeVisitor constructor
Instance Method Summary
Constructor Details
.new(document, definitions:) ⇒ RenameNodeVisitor
Instance Method Details
#on_fragment_definition(node, _parent)
[ GitHub ]# File 'lib/graphql/client.rb', line 242
def on_fragment_definition(node, _parent) rename_node(node) super end
#on_fragment_spread(node, _parent)
[ GitHub ]# File 'lib/graphql/client.rb', line 252
def on_fragment_spread(node, _parent) rename_node(node) super end
#on_operation_definition(node, _parent)
[ GitHub ]# File 'lib/graphql/client.rb', line 247
def on_operation_definition(node, _parent) rename_node(node) super end
#rename_node(node) (private)
[ GitHub ]# File 'lib/graphql/client.rb', line 259
def rename_node(node) definition = @definitions[node.name] if definition node.extend(LazyName) node._definition = definition end end