Versions in this module Expand all Collapse all v0 v0.4.18 May 30, 2016 Changes in this version + const TypeKindEnum + const TypeKindInputObject + const TypeKindInterface + const TypeKindList + const TypeKindNonNull + const TypeKindObject + const TypeKindScalar + const TypeKindUnion + var Boolean = NewScalar(ScalarConfig{ ... }) + var Float = NewScalar(ScalarConfig{ ... }) + var ID = NewScalar(ScalarConfig{ ... }) + var IncludeDirective = NewDirective(&Directive{ ... }) + var Int = NewScalar(ScalarConfig{ ... }) + var NameRegExp = regexp.Compile("^[_a-zA-Z][_a-zA-Z0-9]*$") + var SkipDirective = NewDirective(&Directive{ ... }) + var SpecifiedRules = []ValidationRuleFn + var String = NewScalar(ScalarConfig{ ... }) + func CycleErrorMessage(fragName string, spreadNames []string) string + func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node + func IsCompositeType(ttype interface{}) bool + func IsInputType(ttype Type) bool + func IsLeafType(ttype Type) bool + func IsOutputType(ttype Type) bool + func NewLocatedError(err interface{}, nodes []ast.Node) *gqlerrors.Error + func UndefinedFieldMessage(fieldName string, ttypeName string, suggestedTypes []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 + IsPossibleType func(ttype *Object) bool + Name func() string + ObjectType func(value interface{}, info ResolveInfo) *Object + PossibleTypes func() []*Object + 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 BuildExecutionCtxParams struct + AST *ast.Document + Args map[string]interface{} + Context context.Context + Errors []gqlerrors.FormattedError + OperationName string + Result *Result + Root interface{} + Schema Schema + type CollectFieldsParams struct + ExeContext *ExecutionContext + Fields map[string][]*ast.Field + RuntimeType *Object + SelectionSet *ast.SelectionSet + VisitedFragmentNames map[string]bool + type Composite interface + Name func() string + type Directive struct + Args []*Argument + Description string + Name string + OnField bool + OnFragment bool + OnOperation bool + func NewDirective(config *Directive) *Directive + type Enum struct + PrivateDescription string + PrivateName string + 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 ExecuteFieldsParams struct + ExecutionContext *ExecutionContext + Fields map[string][]*ast.Field + ParentType *Object + Source interface{} + type ExecuteOperationParams struct + ExecutionContext *ExecutionContext + Operation ast.Definition + Root interface{} + type ExecuteParams struct + AST *ast.Document + Args map[string]interface{} + Context context.Context + OperationName string + Root interface{} + Schema Schema + type ExecutionContext struct + Context context.Context + Errors []gqlerrors.FormattedError + Fragments map[string]ast.Definition + Operation ast.Definition + Root interface{} + Schema Schema + VariableValues map[string]interface{} + type Field struct + Args FieldConfigArgument + DeprecationReason string + Description string + Name string + Resolve FieldResolveFn + Type Output + type FieldArgument struct + DefaultValue interface{} + Description string + Name string + Type Type + type FieldConfigArgument map[string]*ArgumentConfig + type FieldDefinition struct + Args []*Argument + DeprecationReason string + Description string + Name string + Resolve 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 Fields map[string]*Field + 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) 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) IsPossibleType(ttype *Object) bool + func (it *Interface) Name() string + func (it *Interface) ObjectType(value interface{}, info ResolveInfo) *Object + func (it *Interface) PossibleTypes() []*Object + func (it *Interface) String() string + type InterfaceConfig struct + Description string + Fields interface{} + Name string + ResolveType ResolveTypeFn + type InterfacesThunk func() []*Interface + type IsTypeOfFn func(value interface{}, info ResolveInfo) bool + 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 + PrivateName string + 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 + 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 ParseLiteralFn func(valueAST ast.Value) interface + type ParseValueFn func(value interface{}) interface + type ResolveInfo struct + FieldASTs []*ast.Field + FieldName string + Fragments map[string]ast.Definition + Operation ast.Definition + ParentType Composite + ReturnType Output + RootValue interface{} + Schema Schema + VariableValues map[string]interface{} + type ResolveParams struct + Args map[string]interface{} + Context context.Context + Info ResolveInfo + Schema Schema + Source interface{} + type ResolveTypeFn func(value interface{}, info ResolveInfo) *Object + type Result struct + Data interface{} + Errors []gqlerrors.FormattedError + 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) Directive(name string) *Directive + func (gq *Schema) Directives() []*Directive + func (gq *Schema) MutationType() *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 + Mutation *Object + Query *Object + Subscription *Object + type SerializeFn func(value interface{}) 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) IsPossibleType(ttype *Object) bool + func (ut *Union) Name() string + func (ut *Union) ObjectType(value interface{}, info ResolveInfo) *Object + func (ut *Union) PossibleTypes() []*Object + func (ut *Union) String() string + type UnionConfig struct + Description string + Name string + ResolveType ResolveTypeFn + Types []*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 HasSelectionSet) []*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 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