class GraphQL::Client::RenameNodeHook

Public Class Methods

new(definitions) click to toggle source
# File lib/graphql/client.rb, line 288
def initialize(definitions)
  @definitions = definitions
end

Public Instance Methods

rename_node(node, _parent) click to toggle source
# File lib/graphql/client.rb, line 292
def rename_node(node, _parent)
  definition = @definitions[node.name]
  if definition
    node.extend(LazyName)
    node._definition = definition
  end
end