class GraphqlMigrateExecution::Implicit
These fields use GraphQL-Ruby’s default, implicit resolution behavior. It’s changing in the future: - Currently, it tries a combination of method calls and hash key lookups - In the future, it will only try a method call: object.public_send(field_name, **field_args)
If your field sometimes uses a method call, and other times uses a hash key, you’ll have to implement that logic in the field itself
. If your field always uses a method call, use --implicit=ignore to disable the warning from this refactor. (Your field will be supported as-is).
If your field always uses a hash key, use --implicit=hash_key (to add a Symbol-based hash_key: ... configuration) or --implicit=hash_key_string (to add a String-based one).
Public Instance Methods
Source
# File lib/graphql_migrate_execution/implicit.rb, line 16 def migrate(field_definition) case @migration.implicit when "ignore", nil # do nothing when "hash_key" inject_field_keyword(field_definition, :hash_key, field_definition.name.inspect) when "hash_key_string" inject_field_keyword(field_definition, :hash_key, field_definition.name.to_s.inspect) else raise ArgumentError, "Unexpected `--implicit` argument: #{@migration.implicit.inspect}" end end