Closed soerenmeier closed 1 year ago
@soerenmeier I did some investigation on the naming and didn't find any consistency regarding the naming.
graphql-parse-resolve-info
npm package has it in the following way:
name
: the name of the GraphQL fieldalias
: the alias this GraphQL field has been requested as, or if no alias was specified then thename
graphql-ruby
has only this:
#name ⇒ String
(also:#graphql_name
) readonly The GraphQL name for this field, camelized unless camelize: false is provided.
#original_name ⇒ Symbol
readonly The original name of the field, passed in by the user.
So, I propose to remain field_unique_name
as field_name
, while the proposed field_name
being named as field_original_name
. This way, we'll preserve backwards compatibility and naming consistency over all the methods.
Currently it is only possible to get the name or if an alias is present the alias, or I'm missing something. This exposed the name and alias separately. I'm not sure about the name
field_unique_name
.