depth

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL