Skip to content

Add useAliasForFieldNames to graphql-apt for alias-aware naming#3276

Merged
velo merged 1 commit intomasterfrom
feature/graphql-apt-alias-field-names
Mar 18, 2026
Merged

Add useAliasForFieldNames to graphql-apt for alias-aware naming#3276
velo merged 1 commit intomasterfrom
feature/graphql-apt-alias-field-names

Conversation

@velo
Copy link
Copy Markdown
Member

@velo velo commented Mar 18, 2026

Summary

  • Adds useAliasForFieldNames config to @GraphqlSchema (boolean, default true) and @GraphqlQuery (Toggle, default INHERIT)
  • When enabled and a GraphQL alias is present (e.g., specification: specs { ... }), the generated inner record class and field use the alias (Specification specification) instead of the schema field name (Specs specs)
  • Without aliases, behavior is unchanged — field names are used as before

Test plan

  • 3 new tests: alias enabled, alias disabled, method-level override
  • All 58 graphql-apt tests pass (55 existing + 3 new)

🤖 Generated with Claude Code

@velo velo merged commit d39259f into master Mar 18, 2026
4 checks passed
@velo velo deleted the feature/graphql-apt-alias-field-names branch March 18, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant