Versions in this module Expand all Collapse all v0 v0.1.1 Aug 23, 2022 v0.1.0 Aug 23, 2022 Changes in this version + const DefaultDeprecationReason + const DirectiveLocationArgumentDefinition + const DirectiveLocationEnum + const DirectiveLocationEnumValue + const DirectiveLocationField + const DirectiveLocationFieldDefinition + const DirectiveLocationFragmentDefinition + const DirectiveLocationFragmentSpread + const DirectiveLocationInlineFragment + const DirectiveLocationInputFieldDefinition + const DirectiveLocationInputObject + const DirectiveLocationInterface + const DirectiveLocationMutation + const DirectiveLocationObject + const DirectiveLocationQuery + const DirectiveLocationScalar + const DirectiveLocationSchema + const DirectiveLocationSubscription + const DirectiveLocationUnion + const TAG + const TypeKindEnum + const TypeKindInputObject + const TypeKindInterface + const TypeKindList + const TypeKindNonNull + const TypeKindObject + const TypeKindScalar + const TypeKindUnion + var Boolean = NewScalar(ScalarConfig{ ... }) + var DateTime = NewScalar(ScalarConfig{ ... }) + var DeprecatedDirective = NewDirective(DirectiveConfig{ ... }) + var Float = NewScalar(ScalarConfig{ ... }) + var ID = NewScalar(ScalarConfig{ ... }) + var IncludeDirective = NewDirective(DirectiveConfig{ ... }) + var Int = NewScalar(ScalarConfig{ ... }) + var NameRegExp = regexp.MustCompile("^[_a-zA-Z][_a-zA-Z0-9]*$") + var SkipDirective = NewDirective(DirectiveConfig{ ... }) + var SpecifiedDirectives = []*Directive + var SpecifiedRules = []ValidationRuleFn + var String = NewScalar(ScalarConfig{ ... }) + func CycleErrorMessage(fragName string, spreadNames []string) string + func DefaultResolveFn(p ResolveParams) (interface{}, error) + func ExecuteSubscription(p ExecuteParams) chan *Result + func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node + func IsAbstractType(ttype interface{}) bool + func IsCompositeType(ttype interface{}) bool + func IsInputType(ttype Type) bool + func IsLeafType(ttype Type) bool + func IsOutputType(ttype Type) bool + func MisplaceDirectiveMessage(directiveName string, location string) string + func NewLocatedError(err interface{}, nodes []ast.Node) *gqlerrors.Error + func NewLocatedErrorWithPath(err interface{}, nodes []ast.Node, path []interface{}) *gqlerrors.Error + func Subscribe(p Params) chan *Result + func UndefinedFieldMessage(fieldName string, ttypeName string, suggestedTypeNames []string, ...) string + func UndefinedVarMessage(varName string, opName string) string + func UnusedVariableMessage(varName string, opName string) string + func VisitUsingRules(schema *Schema, typeInfo *TypeInfo, astDoc *ast.Document, ...) []gqlerrors.FormattedError + type Abstract interface + Name func() string + type Argument struct + DefaultValue interface{} + PrivateDescription string + PrivateName string + Type Input + func (st *Argument) Description() string + func (st *Argument) Error() error + func (st *Argument) Name() string + func (st *Argument) String() string + type ArgumentConfig struct + DefaultValue interface{} + Description string + Type Input + type Composite interface + Description func() string + Error func() error + Name func() string + String func() string + type Directive struct + Args []*Argument + Description string + Locations []string + Name string + func NewDirective(config DirectiveConfig) *Directive + type DirectiveConfig struct + Args FieldConfigArgument + Description string + Locations []string + Name string + type Enum struct + PrivateDescription string + PrivateName string + var DirectiveLocationEnumType *Enum + var TypeKindEnumType *Enum + func NewEnum(config EnumConfig) *Enum + func (gt *Enum) Description() string + func (gt *Enum) Error() error + func (gt *Enum) Name() string + func (gt *Enum) ParseLiteral(valueAST ast.Value) interface{} + func (gt *Enum) ParseValue(value interface{}) interface{} + func (gt *Enum) Serialize(value interface{}) interface{} + func (gt *Enum) String() string + func (gt *Enum) Values() []*EnumValueDefinition + type EnumConfig struct + Description string + Name string + Values EnumValueConfigMap + type EnumValueConfig struct + DeprecationReason string + Description string + Value interface{} + type EnumValueConfigMap map[string]*EnumValueConfig + type EnumValueDefinition struct + DeprecationReason string + Description string + Name string + Value interface{} + type ExecuteParams struct + AST *ast.Document + Args map[string]interface{} + Context context.Context + OperationName string + Root interface{} + Schema Schema + type ExecutionFinishFunc func(*Result) + type Extension interface + ExecutionDidStart func(context.Context) (context.Context, ExecutionFinishFunc) + GetResult func(context.Context) interface{} + HasResult func() bool + Init func(context.Context, *Params) context.Context + Name func() string + ParseDidStart func(context.Context) (context.Context, ParseFinishFunc) + ResolveFieldDidStart func(context.Context, *ResolveInfo) (context.Context, ResolveFieldFinishFunc) + ValidationDidStart func(context.Context) (context.Context, ValidationFinishFunc) + type Field struct + Args FieldConfigArgument + DeprecationReason string + Description string + Name string + Resolve FieldResolveFn + Subscribe FieldResolveFn + Type Output + type FieldArgument struct + DefaultValue interface{} + Description string + Name string + Type Type + type FieldConfigArgument map[string]*ArgumentConfig + func BindArg(obj interface{}, tags ...string) FieldConfigArgument + type FieldDefinition struct + Args []*Argument + DeprecationReason string + Description string + Name string + Resolve FieldResolveFn + Subscribe FieldResolveFn + Type Output + var SchemaMetaFieldDef *FieldDefinition + var TypeMetaFieldDef *FieldDefinition + var TypeNameMetaFieldDef *FieldDefinition + func DefaultTypeInfoFieldDef(schema *Schema, parentType Type, fieldAST *ast.Field) *FieldDefinition + type FieldDefinitionMap map[string]*FieldDefinition + type FieldResolveFn func(p ResolveParams) (interface{}, error) + type FieldResolver interface + Resolve func(p ResolveParams) (interface{}, error) + type Fields map[string]*Field + func BindFields(obj interface{}) Fields + type FieldsThunk func() Fields + type HasSelectionSet interface + GetKind func() string + GetLoc func() *ast.Location + GetSelectionSet func() *ast.SelectionSet + type Input interface + Description func() string + Error func() error + Name func() string + String func() string + type InputObject struct + PrivateDescription string + PrivateName string + func NewInputObject(config InputObjectConfig) *InputObject + func (gt *InputObject) AddFieldConfig(fieldName string, fieldConfig *InputObjectFieldConfig) + func (gt *InputObject) Description() string + func (gt *InputObject) Error() error + func (gt *InputObject) Fields() InputObjectFieldMap + func (gt *InputObject) Name() string + func (gt *InputObject) String() string + type InputObjectConfig struct + Description string + Fields interface{} + Name string + type InputObjectConfigFieldMap map[string]*InputObjectFieldConfig + type InputObjectConfigFieldMapThunk func() InputObjectConfigFieldMap + type InputObjectField struct + DefaultValue interface{} + PrivateDescription string + PrivateName string + Type Input + func (st *InputObjectField) Description() string + func (st *InputObjectField) Error() error + func (st *InputObjectField) Name() string + func (st *InputObjectField) String() string + type InputObjectFieldConfig struct + DefaultValue interface{} + Description string + Type Input + type InputObjectFieldMap map[string]*InputObjectField + type Interface struct + PrivateDescription string + PrivateName string + ResolveType ResolveTypeFn + func NewInterface(config InterfaceConfig) *Interface + func (it *Interface) AddFieldConfig(fieldName string, fieldConfig *Field) + func (it *Interface) Description() string + func (it *Interface) Error() error + func (it *Interface) Fields() (fields FieldDefinitionMap) + func (it *Interface) Name() string + func (it *Interface) String() string + type InterfaceConfig struct + Description string + Fields interface{} + Name string + ResolveType ResolveTypeFn + type InterfacesThunk func() []*Interface + type IsTypeOfFn func(p IsTypeOfParams) bool + type IsTypeOfParams struct + Context context.Context + Info ResolveInfo + Value interface{} + type Leaf interface + Description func() string + Error func() error + Name func() string + Serialize func(value interface{}) interface{} + String func() string + type List struct + OfType Type + func NewList(ofType Type) *List + func (gl *List) Description() string + func (gl *List) Error() error + func (gl *List) Name() string + func (gl *List) String() string + type Named interface + String func() string + func GetNamed(ttype Type) Named + type NonNull struct + OfType Type + func NewNonNull(ofType Type) *NonNull + func (gl *NonNull) Description() string + func (gl *NonNull) Error() error + func (gl *NonNull) Name() string + func (gl *NonNull) String() string + type Nullable interface + func GetNullable(ttype Type) Nullable + type Object struct + IsTypeOf IsTypeOfFn + PrivateDescription string + PrivateName string + var DirectiveType *Object + var EnumValueType *Object + var FieldType *Object + var InputValueType *Object + var SchemaType *Object + var TypeType *Object + func NewObject(config ObjectConfig) *Object + func (gt *Object) AddFieldConfig(fieldName string, fieldConfig *Field) + func (gt *Object) Description() string + func (gt *Object) Error() error + func (gt *Object) Fields() FieldDefinitionMap + func (gt *Object) Interfaces() []*Interface + func (gt *Object) Name() string + func (gt *Object) String() string + type ObjectConfig struct + Description string + Fields interface{} + Interfaces interface{} + IsTypeOf IsTypeOfFn + Name string + type Output interface + Description func() string + Error func() error + Name func() string + String func() string + type Params struct + Context context.Context + OperationName string + RequestString string + RootObject map[string]interface{} + Schema Schema + VariableValues map[string]interface{} + type ParseFinishFunc func(error) + type ParseLiteralFn func(valueAST ast.Value) interface + type ParseValueFn func(value interface{}) interface + type ResolveFieldFinishFunc func(interface{}, error) + type ResolveInfo struct + FieldASTs []*ast.Field + FieldName string + Fragments map[string]ast.Definition + Operation ast.Definition + ParentType Composite + Path *ResponsePath + ReturnType Output + RootValue interface{} + Schema Schema + VariableValues map[string]interface{} + type ResolveParams struct + Args map[string]interface{} + Context context.Context + Info ResolveInfo + Source interface{} + type ResolveTypeFn func(p ResolveTypeParams) *Object + type ResolveTypeParams struct + Context context.Context + Info ResolveInfo + Value interface{} + type ResponsePath struct + Key interface{} + Prev *ResponsePath + func (p *ResponsePath) AsArray() []interface{} + func (p *ResponsePath) WithKey(key interface{}) *ResponsePath + type Result struct + Data interface{} + Errors []gqlerrors.FormattedError + Extensions map[string]interface{} + func Do(p Params) *Result + func Execute(p ExecuteParams) (result *Result) + func (r *Result) HasErrors() bool + type Scalar struct + PrivateDescription string + PrivateName string + func NewScalar(config ScalarConfig) *Scalar + func (st *Scalar) Description() string + func (st *Scalar) Error() error + func (st *Scalar) Name() string + func (st *Scalar) ParseLiteral(valueAST ast.Value) interface{} + func (st *Scalar) ParseValue(value interface{}) interface{} + func (st *Scalar) Serialize(value interface{}) interface{} + func (st *Scalar) String() string + type ScalarConfig struct + Description string + Name string + ParseLiteral ParseLiteralFn + ParseValue ParseValueFn + Serialize SerializeFn + type Schema struct + func NewSchema(config SchemaConfig) (Schema, error) + func (gq *Schema) AddExtensions(e ...Extension) + func (gq *Schema) AddImplementation() error + func (gq *Schema) AppendType(objectType Type) error + func (gq *Schema) Directive(name string) *Directive + func (gq *Schema) Directives() []*Directive + func (gq *Schema) IsPossibleType(abstractType Abstract, possibleType *Object) bool + func (gq *Schema) MutationType() *Object + func (gq *Schema) PossibleTypes(abstractType Abstract) []*Object + func (gq *Schema) QueryType() *Object + func (gq *Schema) SubscriptionType() *Object + func (gq *Schema) Type(name string) Type + func (gq *Schema) TypeMap() TypeMap + type SchemaConfig struct + Directives []*Directive + Extensions []Extension + Mutation *Object + Query *Object + Subscription *Object + Types []Type + type SerializeFn func(value interface{}) interface + type SubscribeParams struct + FieldResolver FieldResolveFn + FieldSubscriber FieldResolveFn + OperationName string + RequestString string + RootValue interface{} + Schema Schema + VariableValues map[string]interface{} + type Type interface + Description func() string + Error func() error + Name func() string + String func() string + type TypeInfo struct + func NewTypeInfo(opts *TypeInfoConfig) *TypeInfo + func (ti *TypeInfo) Argument() *Argument + func (ti *TypeInfo) Directive() *Directive + func (ti *TypeInfo) Enter(node ast.Node) + func (ti *TypeInfo) FieldDef() *FieldDefinition + func (ti *TypeInfo) InputType() Input + func (ti *TypeInfo) Leave(node ast.Node) + func (ti *TypeInfo) ParentType() Composite + func (ti *TypeInfo) Type() Output + type TypeInfoConfig struct + FieldDefFn fieldDefFn + Schema *Schema + type TypeMap map[string]Type + type Union struct + PrivateDescription string + PrivateName string + ResolveType ResolveTypeFn + func NewUnion(config UnionConfig) *Union + func (ut *Union) Description() string + func (ut *Union) Error() error + func (ut *Union) Name() string + func (ut *Union) String() string + func (ut *Union) Types() []*Object + type UnionConfig struct + Description string + Name string + ResolveType ResolveTypeFn + Types interface{} + type UnionTypesThunk func() []*Object + type ValidationContext struct + func NewValidationContext(schema *Schema, astDoc *ast.Document, typeInfo *TypeInfo) *ValidationContext + func (ctx *ValidationContext) Argument() *Argument + func (ctx *ValidationContext) Directive() *Directive + func (ctx *ValidationContext) Document() *ast.Document + func (ctx *ValidationContext) Errors() []gqlerrors.FormattedError + func (ctx *ValidationContext) FieldDef() *FieldDefinition + func (ctx *ValidationContext) Fragment(name string) *ast.FragmentDefinition + func (ctx *ValidationContext) FragmentSpreads(node *ast.SelectionSet) []*ast.FragmentSpread + func (ctx *ValidationContext) InputType() Input + func (ctx *ValidationContext) ParentType() Composite + func (ctx *ValidationContext) RecursiveVariableUsages(operation *ast.OperationDefinition) []*VariableUsage + func (ctx *ValidationContext) RecursivelyReferencedFragments(operation *ast.OperationDefinition) []*ast.FragmentDefinition + func (ctx *ValidationContext) ReportError(err error) + func (ctx *ValidationContext) Schema() *Schema + func (ctx *ValidationContext) Type() Output + func (ctx *ValidationContext) VariableUsages(node HasSelectionSet) []*VariableUsage + type ValidationFinishFunc func([]gqlerrors.FormattedError) + type ValidationResult struct + Errors []gqlerrors.FormattedError + IsValid bool + func ValidateDocument(schema *Schema, astDoc *ast.Document, rules []ValidationRuleFn) (vr ValidationResult) + type ValidationRuleFn func(context *ValidationContext) *ValidationRuleInstance + type ValidationRuleInstance struct + VisitorOpts *visitor.VisitorOptions + func ArgumentsOfCorrectTypeRule(context *ValidationContext) *ValidationRuleInstance + func DefaultValuesOfCorrectTypeRule(context *ValidationContext) *ValidationRuleInstance + func FieldsOnCorrectTypeRule(context *ValidationContext) *ValidationRuleInstance + func FragmentsOnCompositeTypesRule(context *ValidationContext) *ValidationRuleInstance + func KnownArgumentNamesRule(context *ValidationContext) *ValidationRuleInstance + func KnownDirectivesRule(context *ValidationContext) *ValidationRuleInstance + func KnownFragmentNamesRule(context *ValidationContext) *ValidationRuleInstance + func KnownTypeNamesRule(context *ValidationContext) *ValidationRuleInstance + func LoneAnonymousOperationRule(context *ValidationContext) *ValidationRuleInstance + func NoFragmentCyclesRule(context *ValidationContext) *ValidationRuleInstance + func NoUndefinedVariablesRule(context *ValidationContext) *ValidationRuleInstance + func NoUnusedFragmentsRule(context *ValidationContext) *ValidationRuleInstance + func NoUnusedVariablesRule(context *ValidationContext) *ValidationRuleInstance + func OverlappingFieldsCanBeMergedRule(context *ValidationContext) *ValidationRuleInstance + func PossibleFragmentSpreadsRule(context *ValidationContext) *ValidationRuleInstance + func ProvidedNonNullArgumentsRule(context *ValidationContext) *ValidationRuleInstance + func ScalarLeafsRule(context *ValidationContext) *ValidationRuleInstance + func UniqueArgumentNamesRule(context *ValidationContext) *ValidationRuleInstance + func UniqueFragmentNamesRule(context *ValidationContext) *ValidationRuleInstance + func UniqueInputFieldNamesRule(context *ValidationContext) *ValidationRuleInstance + func UniqueOperationNamesRule(context *ValidationContext) *ValidationRuleInstance + func UniqueVariableNamesRule(context *ValidationContext) *ValidationRuleInstance + func VariablesAreInputTypesRule(context *ValidationContext) *ValidationRuleInstance + func VariablesInAllowedPositionRule(context *ValidationContext) *ValidationRuleInstance + type VariableUsage struct + Node *ast.Variable + Type Input