Documentation ¶
Index ¶
- type Executor
- func (e *Executor) AroundFields(f graphql.FieldMiddleware)
- func (e *Executor) AroundOperations(f graphql.OperationMiddleware)
- func (e *Executor) AroundResponses(f graphql.ResponseMiddleware)
- func (e *Executor) AroundRootFields(f graphql.RootFieldMiddleware)
- func (e *Executor) CreateOperationContext(ctx context.Context, params *graphql.RawParams) (*graphql.OperationContext, gqlerror.List)
- func (e *Executor) DispatchError(ctx context.Context, list gqlerror.List) *graphql.Response
- func (e *Executor) DispatchOperation(ctx context.Context, rc *graphql.OperationContext) (graphql.ResponseHandler, context.Context)
- func (e *Executor) PresentRecoveredError(ctx context.Context, err interface{}) error
- func (e *Executor) SetErrorPresenter(f graphql.ErrorPresenterFunc)
- func (e *Executor) SetQueryCache(cache graphql.Cache)
- func (e *Executor) SetRecoverFunc(f graphql.RecoverFunc)
- func (e *Executor) Use(extension graphql.HandlerExtension)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor executes graphql queries against a schema.
func New ¶
func New(es graphql.ExecutableSchema) *Executor
New creates a new Executor with the given schema, and a default error and recovery callbacks, and no query cache or extensions.
func (*Executor) AroundFields ¶
func (e *Executor) AroundFields(f graphql.FieldMiddleware)
AroundFields is a convenience method for creating an extension that only implements field middleware
func (*Executor) AroundOperations ¶
func (e *Executor) AroundOperations(f graphql.OperationMiddleware)
AroundOperations is a convenience method for creating an extension that only implements operation middleware
func (*Executor) AroundResponses ¶
func (e *Executor) AroundResponses(f graphql.ResponseMiddleware)
AroundResponses is a convenience method for creating an extension that only implements response middleware
func (*Executor) AroundRootFields ¶ added in v0.15.0
func (e *Executor) AroundRootFields(f graphql.RootFieldMiddleware)
AroundRootFields is a convenience method for creating an extension that only implements root field middleware
func (*Executor) CreateOperationContext ¶
func (*Executor) DispatchError ¶
func (*Executor) DispatchOperation ¶
func (e *Executor) DispatchOperation( ctx context.Context, rc *graphql.OperationContext, ) (graphql.ResponseHandler, context.Context)
func (*Executor) PresentRecoveredError ¶
func (*Executor) SetErrorPresenter ¶
func (e *Executor) SetErrorPresenter(f graphql.ErrorPresenterFunc)
func (*Executor) SetQueryCache ¶
func (*Executor) SetRecoverFunc ¶
func (e *Executor) SetRecoverFunc(f graphql.RecoverFunc)
func (*Executor) Use ¶
func (e *Executor) Use(extension graphql.HandlerExtension)
Use adds the given extension to this Executor.