Method: GraphQL::Execution::Lookahead#name

Defined in:
lib/graphql/execution/lookahead.rb

#nameSymbol

The method name of the field. It returns the method_sym of the Lookahead's field.

Examples:

getting the name of a selection

def articles(lookahead:)
  article.selection(:full_content).name # => :full_content
  # ...
end

Returns:

  • (Symbol)


212
213
214
# File 'lib/graphql/execution/lookahead.rb', line 212

def name
  @field && @field.original_name
end