Documentation
¶
Index ¶
- Constants
- Variables
- func AddIntrospectionToSchema(schema *graphql.Schema)
- func BareIntrospectionSchema(schema *graphql.Schema) *graphql.Schema
- func ComputeSchemaJSON(schemaBuilderSchema schemabuilder.Schema) ([]byte, error)
- func IntrospectionQueryTypeOrSelection(typeName, selectionName string) bool
- func RunIntrospectionQuery(schema *graphql.Schema) ([]byte, error)
- type Directive
- type DirectiveLocation
- type EnumValue
- type InputValue
- type Schema
- type Type
- type TypeKind
Constants ¶
View Source
const ( QUERY DirectiveLocation = "QUERY" MUTATION = "MUTATION" FIELD = "FIELD" FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION" FRAGMENT_SPREAD = "FRAGMENT_SPREAD" INLINE_FRAGMENT = "INLINE_FRAGMENT" )
View Source
const ( SCALAR TypeKind = "SCALAR" OBJECT = "OBJECT" INTERFACE = "INTERFACE" UNION = "UNION" ENUM = "ENUM" INPUT_OBJECT = "INPUT_OBJECT" LIST = "LIST" NON_NULL = "NON_NULL" )
View Source
const IntrospectionQuery = `` /* 1019-byte string literal not displayed */
Copied from https://github.com/graphql/graphiql/blob/master/src/utility/introspectionQueries.js
Variables ¶
View Source
var IncludeDirective = Directive{ Description: "Directs the executor to include this field or fragment only when the `if` argument is true.", Locations: []DirectiveLocation{ FIELD, FRAGMENT_SPREAD, INLINE_FRAGMENT, }, Name: "include", Args: []InputValue{ InputValue{ Name: "if", Type: Type{Inner: &graphql.NonNull{Type: &graphql.Scalar{Type: "bool"}}}, Description: "Included when true.", }, }, }
View Source
var SkipDirective = Directive{ Description: "Directs the executor to skip this field or fragment only when the `if` argument is true.", Locations: []DirectiveLocation{ FIELD, FRAGMENT_SPREAD, INLINE_FRAGMENT, }, Name: "skip", Args: []InputValue{ InputValue{ Name: "if", Type: Type{Inner: &graphql.NonNull{Type: &graphql.Scalar{Type: "bool"}}}, Description: "Skipped when true.", }, }, }
View Source
var TypeAsOptionalDirective = Directive{ Description: "Client-side-only directive that instructs the type generator to mark this field as optional. This is useful for making the generated types compliant with Troy persistence schema.", Locations: []DirectiveLocation{ FIELD, }, Name: "type_as_optional", Args: []InputValue{}, }
Functions ¶
func ComputeSchemaJSON ¶
func ComputeSchemaJSON(schemaBuilderSchema schemabuilder.Schema) ([]byte, error)
ComputeSchemaJSON returns the result of executing a GraphQL introspection query.
Types ¶
type Directive ¶
type Directive struct { Name string Description string Locations []DirectiveLocation Args []InputValue }
type DirectiveLocation ¶
type DirectiveLocation string
type InputValue ¶
Click to show internal directories.
Click to hide internal directories.