refactor(macros): use singular entity names for SortBy and Filters types#115
Merged
nicolasburtey merged 1 commit intomainfrom Mar 26, 2026
Merged
Conversation
Stop pluralizing entity names when generating SortBy enums and Filters structs. This aligns with GraphQL industry conventions (GitHub, Shopify, Apollo) where type names use singular nouns. Before: Customer -> CustomersSortBy, CustomersFilters After: Customer -> CustomerSortBy, CustomerFilters Cursor types (e.g., CustomersCursor) remain plural as they represent collections. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d88be3a to
2cd43e9
Compare
nicolasburtey
added a commit
to GaloyMoney/job
that referenced
this pull request
Mar 26, 2026
Picks up singular naming for SortBy/Filters types generated by the EsRepo derive macro (GaloyMoney/es-entity#115). No code changes needed in job since it doesn't use these types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nicolasburtey
added a commit
to GaloyMoney/job
that referenced
this pull request
Mar 26, 2026
* chore(deps): bump es-entity to 0.10.32 Picks up singular naming for SortBy/Filters types generated by the EsRepo derive macro (GaloyMoney/es-entity#115). No code changes needed in job since it doesn't use these types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(deps): update Cargo.lock for es-entity 0.10.32 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SortByenums andFiltersstructs in theEsRepoderive macroCustomernow generatesCustomerSortBy+CustomerFiltersinstead ofCustomersSortBy+CustomersFiltersIssueOrder, Shopify usesProductSortKeys, Apollo recommends singular)CustomersCursor) remain plural as they represent collectionsChanges
combo_cursor.rs: Removepluralizer::pluralizeinsort_by_name()list_for_filters_fn.rs: Removepluralizer::pluralizeinFiltersStruct::ident()Breaking Change
This is a breaking change for downstream consumers — all references to
*sSortByand*sFilterstypes will need updating to singular form.🤖 Generated with Claude Code