Documentation ¶
Overview ¶
Code generated by rice embed-go; DO NOT EDIT.
Index ¶
Constants ¶
View Source
const ( MIME_TYPE_CSS = "text/css" MIME_TYPE_HTML = "text/html" MIME_TYPE_JS = "application/javascript" MIME_TYPE_JSON = "application/json" MIME_TYPE_SVG = "image/svg+xml" )
View Source
const IndexFilename = "graphiql.html"
Variables ¶
This section is empty.
Functions ¶
func RegisterStaticRoutes ¶
func RegisterStaticRoutes(router *mux.Router, protocol, network, apiKey, jwtIssuerURL string, predfinedGraphqlExamples []*GraphqlExample) error
RegisterStaticRoutes registers all GraphiQL static route enabling traffic of `/graphiql` paths. The `predfinedGraphqlExamples` are used to prefill the GraphQL history for the specified protocol and network.
The `jwtIssuerURL` is used to configure the `client-js` library so we are able to easily fetch authentication tokens.
Types ¶
type GraphqlDocument ¶
type GraphqlDocument string
func (GraphqlDocument) MarshalJSON ¶
func (g GraphqlDocument) MarshalJSON() ([]byte, error)
type GraphqlExample ¶
type GraphqlExample struct { Label string `json:"label"` // Document represents the GraphQL query to perform, serialized as `query` because it's what // GraphiQL uses under the hood, so JSON-wise, we respect the name. Document GraphqlDocument `json:"query"` // Variables represents the GraphQL variables that should be used to populated the variables box // in GraphiQL. The `json.RawMessage` is used so we keep control of the order of variables. The // pretty-printing is done client client side by our helper script Variables GraphqlVariablesByNetwork `json:"variables"` }
GraphqlExample represents an history example that should be pre-filled in the History tab of the GraphiQL web interface.
type GraphqlVariablesByNetwork ¶
type GraphqlVariablesByNetwork map[string]json.RawMessage
func (GraphqlVariablesByNetwork) MarshalJSON ¶
func (v GraphqlVariablesByNetwork) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.