Documentation ¶
Index ¶
- type Argument
- type ArgumentConfig
- type Context
- type Enum
- type EnumConfig
- type EnumOption
- type EnumOptionConfig
- type Field
- type FieldConfig
- type Object
- type ObjectConfig
- type ResolveHandler
- type Resolver
- type Scalar
- type ScalarConfig
- type ScalarParseLiteralHandler
- type ScalarParseValueHandler
- type ScalarSerializeHandler
- type Schema
- type SchemaConfig
- type Union
- type UnionConfig
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument interface { Description(string) Argument Type(interface{}) Argument Default(interface{}) Argument Require(bool) Argument Config() ArgumentConfig }
Argument for GraphQL
type ArgumentConfig ¶
type ArgumentConfig interface { Name() string Description() string Type() graphql.Input Object() Object Default() interface{} Require() bool ArgumentConfig() *graphql.ArgumentConfig InputObjectFieldConfig() *graphql.InputObjectFieldConfig }
ArgumentConfig interface
type Context ¶
type Context interface { Deadline() (time.Time, bool) Done() <-chan struct{} Err() error Value(interface{}) interface{} Identity() router.Identity MachineID() string ProcessID() string Context() context.Context Req() *http.Request Res() http.ResponseWriter Client() router.Client Cache() router.CacheAdaptor Message() router.MessageAdaptor GQLSubscription() router.GQLSubscriptionAdaptor DataLoader(interface{}) router.DataLoaderAdaptor KV() router.KV Cookie() router.Cookie Header() router.Header MustParam(s string) router.Value MustQuery(s string) router.Value MustBody(s string) router.Value Param(s string) (router.Value, error) Query(s string) (router.Value, error) Body(s string) (router.Value, error) File(s string) []byte Abort() IsAborted() bool HasErrors() bool Errors() []error GraphQLError(error) Native() router.Context }
Context interface
type EnumConfig ¶
type EnumConfig interface { Name() string Description() string Values() []EnumOption }
EnumConfig interface
type EnumOption ¶
type EnumOption interface { Description(string) EnumOption Value(interface{}) EnumOption Deprecation(string) EnumOption Config() EnumOptionConfig }
EnumOption for GraphQL
type EnumOptionConfig ¶
type EnumOptionConfig interface { Name() string Description() string Value() interface{} Deprecation() string }
EnumOptionConfig interface
type Field ¶
type Field interface { Description(string) Field DeprecationReason(string) Field Type(interface{}) Field Args(...Argument) Field Resolve(ResolveHandler) Field Config() FieldConfig }
Field for GraphQL
type FieldConfig ¶
type FieldConfig interface { Name() string Description() string DeprecationReason() string Type() graphql.Output Args() []Argument Field() *graphql.Field }
FieldConfig interface
type Object ¶
type Object interface { Description(string) Object Fields(...Field) Object RecursiveFields(...Field) Object Args(...Argument) Object Config() ObjectConfig }
Object for GraphQL
type ObjectConfig ¶
type ObjectConfig interface { Name() string Description() string Fields() []Field RecursiveFields() []Field Args() []Argument Output() *graphql.Object HasOutput() bool Input() *graphql.InputObject HasInput() bool }
ObjectConfig interface
type ResolveHandler ¶
ResolveHandler for field resolve
type Resolver ¶
type Resolver interface { Context() Context Params() graphql.ResolveParams Source() interface{} Arg(string) (Value, error) MustArg(string) Value }
Resolver interface
type Scalar ¶
type Scalar interface { Description(string) Scalar Serialize(ScalarSerializeHandler) Scalar ParseValue(ScalarParseValueHandler) Scalar ParseLiteral(ScalarParseLiteralHandler) Scalar Config() ScalarConfig }
Scalar for GraphQL
type ScalarConfig ¶
type ScalarConfig interface { Name() string Description() string Serialize(interface{}) (interface{}, error) ParseValue(interface{}) (interface{}, error) ParseLiteral(ast.Value) (interface{}, error) }
ScalarConfig interface
type ScalarParseLiteralHandler ¶
ScalarParseLiteralHandler for scalar parse literal resolver
type ScalarParseValueHandler ¶
type ScalarParseValueHandler func(interface{}) (interface{}, error)
ScalarParseValueHandler for scalar parse value resolver
type ScalarSerializeHandler ¶
type ScalarSerializeHandler func(interface{}) (interface{}, error)
ScalarSerializeHandler for scalar serialize resolver
type Schema ¶
type Schema interface { Query(Object) Schema Mutation(Object) Schema Subscription(Object) Schema Config() SchemaConfig }
Schema for GraphQL
type SchemaConfig ¶
type SchemaConfig interface { Query() Object Mutation() Object Subscription() Object Schema() graphql.Schema }
SchemaConfig interface
type Union ¶
type Union interface { Description(string) Union Resolve(interface{}, Object) Union Config() UnionConfig }
Union for GraphQL
type UnionConfig ¶
UnionConfig interface
type Value ¶
type Value interface { In(string) Value Key() string Val() []byte Has() bool MustInt() int MustI32() int32 MustI64() int64 MustU32() uint32 MustU64() uint64 MustF32() float32 MustF64() float64 MustBool() bool MustTime() time.Time MustArray() []interface{} Any() interface{} String() string }
Value for GraphQL
Click to show internal directories.
Click to hide internal directories.