Table of Contents

Class GraphQLToolServeMode

Namespace
HotChocolate.AspNetCore
Assembly
HotChocolate.AspNetCore.dll

Represents the different modes of serving the Banana Cake Pop GraphQL tool. This class enables serving the tool in a variety of predefined ways:

  • Latest: Uses the latest version of the tool, served over the cdn.
  • Insider: Uses the insider version of the tool, served over the CDN.
  • Embedded: Uses the tool's embedded files in the package.
In addition, a specific version of the tool can be served over the CDN using the Version(string) method.

The following example shows how to serve the embedded version of the tool:

endpoints
  .MapGraphQL()
  .WithOptions(new GraphQLServerOptions
    {
      Tool = { ServeMode = GraphQLToolServeMode.Embedded }
    });

Or when you want to serve the insider version of the tool:

endpoints
  .MapGraphQL()
  .WithOptions(new GraphQLServerOptions
    {
      Tool = { ServeMode = GraphQLToolServeMode.Insider }
    });

Or when you want to serve a specific version of the tool:

endpoints
  .MapGraphQL()
  .WithOptions(new GraphQLServerOptions
    {
      Tool = { ServeMode = GraphQLToolServeMode.Version("5.0.8") }
    });
public sealed class GraphQLToolServeMode
Inheritance
GraphQLToolServeMode
Inherited Members

Fields

Embedded

Serves the GraphQL tool using the embedded files from the package.

public static readonly GraphQLToolServeMode Embedded

Field Value

GraphQLToolServeMode

Insider

Serves the GraphQL tool using the insider version available over the CDN.

public static readonly GraphQLToolServeMode Insider

Field Value

GraphQLToolServeMode

Latest

Serves the GraphQL tool using the latest version available over the CDN.

public static readonly GraphQLToolServeMode Latest

Field Value

GraphQLToolServeMode

Methods

Version(string)

Serves the GraphQL tool from a specific version available over the CDN.

public static GraphQLToolServeMode Version(string version)

Parameters

version string

The version of the tool to serve.

Returns

GraphQLToolServeMode

A new GraphQLToolServeMode object for serving the specific version.