Skip to content

Commit

Permalink
Map gql schema in all environments, so the UI/Nitro can use it
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Nov 29, 2024
1 parent 8b4f158 commit 94ac2a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/LexBoxApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@
app.UseAuthorization();
app.MapSecurityTxt();
app.MapNitroApp("/api/graphql/ui").WithOptions(new (){ServeMode = GraphQLToolServeMode.Embedded}).AllowAnonymous();
if (app.Environment.IsDevelopment())
//required for vite to generate types
app.MapGraphQLSchema("/api/graphql/schema.graphql").AllowAnonymous();
app.MapGraphQLSchema("/api/graphql/schema.graphql").AllowAnonymous();
app.MapGraphQLHttp("/api/graphql");

app.MapQuartzUI("/api/quartz").RequireAuthorization(new AdminRequiredAttribute());
Expand Down

0 comments on commit 94ac2a7

Please sign in to comment.