Skip to content

Endpoint Options

The UHeadless endpoint can be customized using the builder returned from the .MapUHeadless() method. The builder provides a number of options to configure the endpoint.

Disabling the GraphQL IDE in production

GraphQLEndpointConventionBuilder graphQLEndpointBuilder = app.MapUHeadless();
// Only enable the GraphQL IDE in development
if (!builder.Environment.IsDevelopment())
{
graphQLEndpointBuilder.WithOptions(new GraphQLServerOptions()
{
Tool =
{
Enable = false,
}
});
}

GraphQLServerOptions Properties

PropertyDescription
ToolThe options for configuring the GraphQL tool (e.g., Banana Cake Pop).
SocketsThe options for configuring GraphQL sockets.
AllowedGetOperationsSpecifies which GraphQL options are allowed on GET requests.
EnableGetRequestsSpecifies whether GraphQL HTTP GET requests are allowed.
EnforceGetRequestsPreflightHeaderSpecifies whether to enforce the preflight header for GraphQL HTTP GET requests.
EnableMultipartRequestsSpecifies whether GraphQL HTTP multipart requests are allowed.
EnforceMultipartRequestsPreflightHeaderSpecifies whether to enforce the preflight header for GraphQL HTTP multipart requests.
EnableSchemaRequestsSpecifies whether the GraphQL schema SDL can be downloaded.
EnableBatchingSpecifies whether request batching is enabled.