Documentation
¶
Index ¶
Constants ¶
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 ¶
var Query string
Query is the query generated by graphiql to determine type information
Functions ¶
This section is empty.
Types ¶
type Directive ¶ added in v0.13.7
type Directive struct {
Name string `json:"name"`
Args []*DirectiveArg `json:"args"`
}
type DirectiveArg ¶ added in v0.13.7
type DirectiveDef ¶ added in v0.18.4
type DirectiveDef struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Locations []string `json:"locations,omitempty"`
// NB(vito): don't omitempty - Python complains:
//
// https://github.com/graphql-python/graphql-core/blob/758fef19194005d3a287e28a4e172e0ed7955d42/src/graphql/utilities/build_client_schema.py#L383
Args InputValues `json:"args"`
}
type Directives ¶ added in v0.13.7
type Directives []*Directive
func (Directives) Directive ¶ added in v0.13.7
func (t Directives) Directive(name string) *Directive
func (*Directives) EnumValue ¶ added in v0.18.11
func (t *Directives) EnumValue() string
func (Directives) ExperimentalReason ¶ added in v0.18.4
func (t Directives) ExperimentalReason() string
func (Directives) IsExperimental ¶ added in v0.18.4
func (t Directives) IsExperimental() bool
func (*Directives) SourceMap ¶ added in v0.13.7
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 ¶ added in v0.9.8
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"`
IsDeprecated bool `json:"isDeprecated"`
DeprecationReason *string `json:"deprecationReason"`
}
func (InputValue) DefaultValueZero ¶ added in v0.18.4
func (v InputValue) DefaultValueZero() bool
func (InputValue) IsOptional ¶ added in v0.13.0
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,omitempty"`
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 Introspect ¶ added in v0.18.15
Introspect gets the Dagger Schema
func (*Schema) Exclude ¶ added in v0.20.1
Return a copy of the current schema but without types that comes from the given moduleName. This exclude the actual typedef exposed by the module, enum, interface but also any types that may have been extended by the engine itself for that dependency. For example: `Query.loadXXXFromID`, `Bindings.AsXXX` etc...
func (*Schema) Include ¶ added in v0.20.1
Return a copy of the current schema but with only types that comes from the given moduleName. This include the actual typedef exposed by the module, enum, interface but also any types that may have been extended by the engine itself for that dependency. For example: `Query.loadXXXFromID`, `Bindings.AsXXX` etc...
func (*Schema) ScrubType ¶ added in v0.9.8
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"`
Directives Directives `json:"directives"`
}
func (*Type) ScrubType ¶ added in v0.9.8
Remove all occurrences of a type from the schema, including any fields, input fields, and enum values that reference it. Returns true if this type should be removed, whether because it is the type being scrubbed, or because it is now empty after scrubbing its references.
type TypeRef ¶
type TypeRef struct {
Kind TypeKind `json:"kind"`
Name string `json:"name,omitempty"`
OfType *TypeRef `json:"ofType,omitempty"`
}