diff --git a/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/Program.cs b/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/Program.cs index 680c67a..3336d94 100644 --- a/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/Program.cs +++ b/samples/DistributedWorkers/Trax.Samples.EnergyHub.Hub/Program.cs @@ -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(); diff --git a/samples/JobHunt/Trax.Samples.JobHunt.Hub/Program.cs b/samples/JobHunt/Trax.Samples.JobHunt.Hub/Program.cs index e522e42..5f1f86b 100644 --- a/samples/JobHunt/Trax.Samples.JobHunt.Hub/Program.cs +++ b/samples/JobHunt/Trax.Samples.JobHunt.Hub/Program.cs @@ -112,7 +112,15 @@ builder.Services.AddSingleton(); // ── GraphQL API + subscriptions ───────────────────────────────────────────── -builder.Services.AddTraxGraphQL(graphql => graphql.AddTypeExtension()); +// 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() + .ExposeOperationQueries() + .ExposeOperationMutations() +); builder.Services.AddHealthChecks().AddTraxHealthCheck(); diff --git a/samples/LocalWorkers/Trax.Samples.GameServer.Api/Program.cs b/samples/LocalWorkers/Trax.Samples.GameServer.Api/Program.cs index 71c3c9b..d61b9aa 100644 --- a/samples/LocalWorkers/Trax.Samples.GameServer.Api/Program.cs +++ b/samples/LocalWorkers/Trax.Samples.GameServer.Api/Program.cs @@ -185,6 +185,11 @@ .MaxExecutionDepth(6) .AddDbContext() .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();