Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxDepthExceedLimit ¶
func MaxDepthExceedLimit(es graphql.ExecutableSchema, op *ast.OperationDefinition, limit int) bool
Types ¶
type DepthLimit ¶
type DepthLimit struct { Func func(ctx context.Context, rc *graphql.OperationContext) int // contains filtered or unexported fields }
DepthLimit allows you to define a limit on query depth
If a query is submitted that exceeds the limit, a 422 status code will be returned.
func FixedDepthLimit ¶
func FixedDepthLimit(limit int) *DepthLimit
FixedDepthLimit sets a depth limit that does not change
func (DepthLimit) ExtensionName ¶
func (e DepthLimit) ExtensionName() string
func (DepthLimit) MutateOperationContext ¶
func (e DepthLimit) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error
func (*DepthLimit) Validate ¶
func (e *DepthLimit) Validate(schema graphql.ExecutableSchema) error
Click to show internal directories.
Click to hide internal directories.