Class: GraphqlMigrateExecution::HashKey

Inherits:
Strategy
  • Object
show all
Defined in:
lib/graphql_migrate_execution/hash_key.rb

Overview

These can be future-proofed with ‘hash_key: …` configurations.

Constant Summary

Constants inherited from Strategy

Strategy::METHODS_TO_RENAME

Instance Method Summary collapse

Methods inherited from Strategy

#cleanup, #initialize, prefix_if_necessary, #run, strategy_name

Constructor Details

This class inherits a constructor from GraphqlMigrateExecution::Strategy

Instance Method Details

#migrate(field_definition) ⇒ Object



7
8
9
10
# File 'lib/graphql_migrate_execution/hash_key.rb', line 7

def migrate(field_definition)
  key = field_definition.type_definition.returns_string_hash? ? field_definition.name.to_s.inspect : field_definition.name.inspect
  inject_field_keyword(field_definition, :hash_key, key)
end