Help us shape the future of Go! Take the 2026 Go Developer Survey

complexity

package
v0.17.98 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 3 Imported by: 29

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