Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeKindScalar = TypeKind("SCALAR") TypeKindObject = TypeKind("OBJECT") TypeKindInterface = TypeKind("INTERFACE") TypeKindUnion = TypeKind("UNION") TypeKindEnum = TypeKind("ENUM") TypeKindInputObject = TypeKind("INPUT_OBJECT") TypeKindList = TypeKind("LIST") TypeKindNonNull = TypeKind("NON_NULL") )
Variables ¶
View Source
var Query string
Query is the query generated by graphiql to determine type information
Functions ¶
This section is empty.
Types ¶
type Directive ¶
type Directive struct {
Name string `json:"name"`
Args []*DirectiveArg `json:"args"`
}
func (Directive) Arg ¶
func (t Directive) Arg(name string) *DirectiveArg
type DirectiveArg ¶
type DirectiveDef ¶
type DirectiveDef struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Locations []string `json:"locations,omitempty"`
Args InputValues `json:"args,omitempty"`
}
type Directives ¶
type Directives []*Directive
func (Directives) Directive ¶
func (t Directives) Directive(name string) *Directive
func (*Directives) EnumValue ¶
func (t *Directives) EnumValue() string
func (Directives) ExperimentalReason ¶
func (t Directives) ExperimentalReason() string
func (Directives) IsExperimental ¶
func (t Directives) IsExperimental() bool
func (*Directives) SourceMap ¶
func (t *Directives) SourceMap() *SourceMap
type EnumValue ¶
type EnumValue struct {
Name string `json:"name"`
Description string `json:"description"`
IsDeprecated bool `json:"isDeprecated"`
DeprecationReason string `json:"deprecationReason"`
Directives Directives `json:"directives"`
}
type Field ¶
type Field struct {
Name string `json:"name"`
Description string `json:"description"`
TypeRef *TypeRef `json:"type"`
Args InputValues `json:"args"`
IsDeprecated bool `json:"isDeprecated"`
DeprecationReason string `json:"deprecationReason"`
Directives Directives `json:"directives"`
ParentObject *Type `json:"-"`
}
func (*Field) ReferencesType ¶
type InputValue ¶
type InputValue struct {
Name string `json:"name"`
Description string `json:"description"`
DefaultValue *string `json:"defaultValue"`
TypeRef *TypeRef `json:"type"`
Directives Directives `json:"directives"`
}
func (InputValue) DefaultValueZero ¶
func (v InputValue) DefaultValueZero() bool
func (InputValue) IsOptional ¶
func (v InputValue) IsOptional() bool
type InputValues ¶
type InputValues []InputValue
func (InputValues) HasOptionals ¶
func (i InputValues) HasOptionals() bool
type Response ¶
type Response struct {
Schema *Schema `json:"__schema"`
SchemaVersion string `json:"__schemaVersion"`
}
Response is the introspection query response
type Schema ¶
type Schema struct {
QueryType struct {
Name string `json:"name,omitempty"`
} `json:"queryType"`
MutationType *struct {
Name string `json:"name,omitempty"`
} `json:"mutationType,omitempty"`
SubscriptionType *struct {
Name string `json:"name,omitempty"`
} `json:"subscriptionType,omitempty"`
Types Types `json:"types"`
Directives []*DirectiveDef `json:"directives"`
}
func (*Schema) ScrubType ¶
Remove all occurrences of a type from the schema, including any fields, input fields, and enum values that reference it.
func (*Schema) Subscription ¶
type Type ¶
type Type struct {
Kind TypeKind `json:"kind"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Fields []*Field `json:"fields,omitempty"`
InputFields []InputValue `json:"inputFields,omitempty"`
EnumValues []EnumValue `json:"enumValues,omitempty"`
Interfaces []*Type `json:"interfaces"`
PossibleTypes []*Type `json:"possibleTypes,omitempty"`
Directives Directives `json:"directives"`
}
type TypeRef ¶
type TypeRef struct {
Kind TypeKind `json:"kind"`
Name string `json:"name,omitempty"`
OfType *TypeRef `json:"ofType,omitempty"`
}
func (TypeRef) IsOptional ¶
func (TypeRef) ReferencesType ¶
Click to show internal directories.
Click to hide internal directories.