Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ground ¶
func Ground(option Option) http.HandlerFunc
Ground generates http handler function for Go Playground (with CDN)
Types ¶
type Credentials ¶
type Credentials string
Credentials enumerates strings to specify credentials options.
const ( // OmitCredentials omits the credentials. OmitCredentials Credentials = "omit" // IncludeCredentials accepts the credentials from anywhere. IncludeCredentials Credentials = "include" // SameOriginCredentials accepts the credentials from same-origin. SameOriginCredentials Credentials = "same-origin" )
type CursorShape ¶
type CursorShape string
CursorShape enumerate strings to specify the sahpe of the cursor.
const ( // CursorShapeLine set the cursor shape to line. CursorShapeLine CursorShape = "line" // CursorShapeBlock set the cursor shape to block. CursorShapeBlock CursorShape = "block" // CursorShapeUnderline set the cursor shape to underline. CursorShapeUnderline CursorShape = "underline" )
type Option ¶
type Option struct {
Settings Settings `json:"settings,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
SubscriptionEndpoint string `json:"subscriptionEndpoint,omitempty"`
WorkspaceName string `json:"workspaceName,omitempty"`
Config string `json:"config,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
Option represents the configuration of playground that depends on: https://github.com/prisma/graphql-playground
type Settings ¶
type Settings struct {
CursorShape CursorShape `json:"editor.cursorShape,omitempty"`
FontFamily string `json:"editor.fontFamily,omitempty"`
FontSize float32 `json:"editor.fontSize,omitempty"`
ReuseHeaders bool `json:"editor.reuseHeaders"`
Theme Theme `json:"editor.theme,omitempty"`
BetaUpdates bool `json:"general.betaUpdates"`
PrintWidth float32 `json:"prettier.printWidth,omitempty"`
TabWidth float32 `json:"prettier.tabWidth,omitempty"`
UseTabs bool `json:"prettier.useTabs"`
Credentials Credentials `json:"request.credentials,omitmepty"`
PollingEnabled bool `json:"schema.polling.enable"`
PollingEndpointFilter string `json:"schema.polling.endpointFilter,omitempty"`
PollingInterval float32 `json:"schema.polling.interval,omitempty"`
DisableSchemaComments bool `json:"schema.disableComments"`
HideTraceResponse bool `json:"tracing.hideTracingResponse"`
}
Settings is the setting structure to configure GraphQL Playground.
Click to show internal directories.
Click to hide internal directories.