Skip to content

feat: add BindFields property to TraxQueryModelAttribute#43

Merged
Theauxm merged 1 commit intomainfrom
feat/explicit-field-binding
Mar 25, 2026
Merged

feat: add BindFields property to TraxQueryModelAttribute#43
Theauxm merged 1 commit intomainfrom
feat/explicit-field-binding

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented Mar 25, 2026

Summary

  • Adds FieldBindingBehavior enum (Implicit, Explicit) to Trax.Effect.Attributes
  • Adds BindFields property to TraxQueryModelAttribute, defaulting to Implicit for backwards compatibility
  • When Explicit, downstream QueryModelTypeModule (in Trax.Api) will only expose [Column]-attributed properties in the GraphQL schema

Context

SuiteMirror entities have [NotMapped] PK aliases, DataLoader methods, and AddToDbContext() methods that leak into the GraphQL schema under implicit binding. This property lets entities opt into explicit binding where only DB-mapped columns are exposed.

Test plan

  • dotnet build passes with zero warnings
  • Downstream Trax.Api PR consumes this and all 234 tests pass

…delAttribute

When BindFields is set to Explicit, QueryModelTypeModule only exposes
properties with [Column] attributes in the GraphQL schema, excluding
[NotMapped] properties, methods, and non-column public members.
@Theauxm Theauxm merged commit c15f6e9 into main Mar 25, 2026
1 check passed
@Theauxm Theauxm deleted the feat/explicit-field-binding branch March 25, 2026 20:10
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented Mar 25, 2026

This PR is included in version 1.27.0

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