Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,15 @@
// Depth 6 accommodates the dispatch → mutation → output → nested type →
// field → scalar query chain. The Trax default of 4 is the conservative
// production choice; raise it deliberately when your schema needs it.
builder.Services.AddTraxGraphQL(graphql => graphql.MaxExecutionDepth(6));
builder.Services.AddTraxGraphQL(graphql =>
graphql
.MaxExecutionDepth(6)
// The hub exposes operational queries and scheduler-control mutations
// so the EnergyHub web UI can render the manifest dashboard and
// trigger jobs. Both surfaces are off by default; opt in here.
.ExposeOperationQueries()
.ExposeOperationMutations()
);
builder.Services.AddHealthChecks().AddTraxHealthCheck();

var app = builder.Build();
Expand Down
10 changes: 9 additions & 1 deletion samples/JobHunt/Trax.Samples.JobHunt.Hub/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@
builder.Services.AddSingleton<IEmailSender, StubEmailSender>();

// ── GraphQL API + subscriptions ─────────────────────────────────────────────
builder.Services.AddTraxGraphQL(graphql => graphql.AddTypeExtension<JobHuntSubscriptions>());
// Phase 0 has no [TraxQuery]/[TraxMutation] trains yet, so without the
// operations namespace RootQuery would be empty. Expose ops so the schema
// has at least the framework-level query and mutation fields.
builder.Services.AddTraxGraphQL(graphql =>
graphql
.AddTypeExtension<JobHuntSubscriptions>()
.ExposeOperationQueries()
.ExposeOperationMutations()
);

builder.Services.AddHealthChecks().AddTraxHealthCheck();

Expand Down
5 changes: 5 additions & 0 deletions samples/LocalWorkers/Trax.Samples.GameServer.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
.MaxExecutionDepth(6)
.AddDbContext<GameDbContext>()
.AddTypeExtensions(typeof(Program).Assembly)
// The web UI surfaces health, manifests, executions, and dead letters
// for the in-browser ops dashboard, and lets operators trigger /
// cancel jobs. Both surfaces are off by default; opt in here.
.ExposeOperationQueries()
.ExposeOperationMutations()
);
builder.Services.AddHealthChecks().AddTraxHealthCheck();

Expand Down
Loading