Skip to content

Add GameServer query model sample#23

Merged
Theauxm merged 3 commits intomainfrom
feat/query-model-sample
Mar 16, 2026
Merged

Add GameServer query model sample#23
Theauxm merged 3 commits intomainfrom
feat/query-model-sample

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented Mar 16, 2026

Summary

  • GameDbContext with PlayerRecord and MatchRecord entities using [TraxQueryModel]
  • PlayerRecord: all features enabled (paging, filtering, sorting, projection)
  • MatchRecord: sorting disabled to demonstrate per-model feature toggles
  • Auto-creates game schema/tables and seeds 8 players + 6 matches on startup
  • Updated Program.cs to use AddTraxGraphQL builder with AddDbContext()

Depends on TraxSharp/Trax.Effect#33 and TraxSharp/Trax.Api#18.

Test plan

  • API starts and creates game schema tables
  • discover.playerRecords query with pagination, filtering, and sorting works
  • discover.matchRecords query with pagination and filtering works (no sorting)
  • Seed data populated on first run

Theauxm added 3 commits March 16, 2026 14:04
Adds PlayerRecord and MatchRecord entities with [TraxQueryModel] attributes,
GameDbContext, schema creation, seed data, and updated API Program.cs to
demonstrate declarative GraphQL query model exposure.
Add GraphQLNamespaces static constant classes and apply namespace
attributes to all trains and query models across GameServer, EnergyHub,
and ContentShield samples.
@Theauxm Theauxm merged commit 6fe449c into main Mar 16, 2026
1 of 2 checks passed
@Theauxm Theauxm deleted the feat/query-model-sample branch March 16, 2026 21:44
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented Mar 16, 2026

This PR is included in version 1.14.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