Documentation ¶
Index ¶
- type Actograph
- func (agh *Actograph) ConstructDirective(dir *ast.Directive, node ast.Node) (directive.Directive, error)
- func (agh *Actograph) Do(request RequestQuery) (*Result, error)
- func (agh *Actograph) Parse(graphqlFile []byte) error
- func (agh *Actograph) RegisterDirective(dir directive.Definition) error
- func (agh *Actograph) RegisterDirectives(dirs ...directive.Definition) error
- func (agh *Actograph) RegisterScalar(cfg ScalarConfig) error
- func (agh *Actograph) RegisterScalars(cfgs ...ScalarConfig) error
- func (agh *Actograph) Schema() (graphql.Schema, error)
- func (agh *Actograph) Validate() error
- type ParseLiteralFn
- type ParseValueFn
- type RequestQuery
- type Result
- type ScalarConfig
- type ScalarDefinition
- type SerializeFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actograph ¶ added in v0.0.2
type Actograph struct {
// contains filtered or unexported fields
}
func NewActograph ¶ added in v0.0.2
func NewActograph() *Actograph
func NewActographBytes ¶ added in v0.0.2
func NewActographFiles ¶ added in v0.0.3
func (*Actograph) ConstructDirective ¶ added in v0.0.2
func (*Actograph) Do ¶ added in v0.0.2
func (agh *Actograph) Do(request RequestQuery) (*Result, error)
func (*Actograph) RegisterDirective ¶ added in v0.0.2
func (agh *Actograph) RegisterDirective(dir directive.Definition) error
func (*Actograph) RegisterDirectives ¶ added in v0.0.2
func (agh *Actograph) RegisterDirectives(dirs ...directive.Definition) error
func (*Actograph) RegisterScalar ¶ added in v0.0.4
func (agh *Actograph) RegisterScalar(cfg ScalarConfig) error
func (*Actograph) RegisterScalars ¶ added in v0.0.4
func (agh *Actograph) RegisterScalars(cfgs ...ScalarConfig) error
type ParseLiteralFn ¶ added in v0.0.4
ParseLiteralFn is a function type for parsing the literal value of a GraphQLScalar type
type ParseValueFn ¶ added in v0.0.4
type ParseValueFn func(value interface{}) interface{}
ParseValueFn is a function type for parsing the value of a GraphQLScalar type
type RequestQuery ¶
type RequestQuery struct { // A GraphQL language formatted string representing the requested operation. RequestString string // A mapping of variable name to runtime value to use for all variables // defined in the requestString. VariableValues map[string]interface{} // The name of the operation to use if requestString contains multiple // possible operations. Can be omitted if requestString contains only // one operation. OperationName string // The value provided as the first argument to resolver functions on the top // level type (e.g. the query object type). RootObject map[string]interface{} // Context may be provided to pass application-specific per-request // information to resolve functions. Context context.Context }
type Result ¶
type Result struct { Data interface{} `json:"data"` Errors []gqlerrors.FormattedError `json:"errors,omitempty"` Extensions map[string]interface{} `json:"extensions,omitempty"` }
Result has the response, errors and extensions from the resolved schema
type ScalarConfig ¶ added in v0.0.4
type ScalarConfig struct { Name string Description string Serialize SerializeFn ParseValue ParseValueFn ParseLiteral ParseLiteralFn }
ScalarConfig options for creating a new GraphQLScalar
type ScalarDefinition ¶ added in v0.0.4
type SerializeFn ¶ added in v0.0.4
type SerializeFn func(value interface{}) interface{}
SerializeFn is a function type for serializing a GraphQLScalar type value
Source Files ¶
Click to show internal directories.
Click to hide internal directories.