complexity

package
v0.17.85 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 3 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(
	ctx context.Context,
	es graphql.ExecutableSchema,
	op *ast.OperationDefinition,
	vars map[string]any,
	opts ...Option,
) int

Types

type Option added in v0.17.85

type Option func(*complexityOptions)

func WithFixedScalarValue added in v0.17.85

func WithFixedScalarValue(v int) Option

WithFixedScalarValue sets the default value attributed to scalar and enum fields.

func WithIgnoreFields added in v0.17.85

func WithIgnoreFields(m map[string]struct{}) Option

WithIgnoreFields specifies which fields are ignored in the complexity calculation. It's equivalent to setting the value of these fields to zero.

Jump to

Keyboard shortcuts

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