fragmentArguments

package
v0.13.8-0...-a8de8dd Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const BASE62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Variables

This section is empty.

Functions

func Transform

func Transform[PluginConfig any](ctx context.Context, db plugins.DatabasePool[PluginConfig]) error

Transform is responsible for walking down a document's selection and replaces and fragment spreads with a corresponding fragment references that has the fragment arguments inlined

func ValidateFragmentArgumentValues

func ValidateFragmentArgumentValues(
	ctx context.Context,
	db plugins.DatabasePool[config.PluginConfig],
	errs *plugins.ErrorList,
)

func ValidateFragmentArgumentsMissingWith

func ValidateFragmentArgumentsMissingWith(
	ctx context.Context,
	db plugins.DatabasePool[config.PluginConfig],
	errs *plugins.ErrorList,
)

Types

type DirectiveArgValueNode

type DirectiveArgValueNode struct {
	ID     int    `json:"id"`
	Kind   string `json:"kind"`
	Raw    string `json:"raw"`
	Parent *int   `json:"parent,omitempty"`
	// Name is set when this node is a field of an input object literal
	Name     string                   `json:"name,omitempty"`
	Children []*DirectiveArgValueNode `json:"children"`
}

DirectiveArgValueNode represents a node in the argument value tree.

type DirectiveArgument

type DirectiveArgument struct {
	Name  string                 `json:"name"`
	Value *DirectiveArgValueNode `json:"value"` // Full nested structure
}

type DocArg

type DocArg struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	TypeModifiers string `json:"type_modifiers"`
	DefaultValue  int64  `json:"default_value"`
	Raw           string `json:"raw"`
	Kind          string `json:"kind"`
}

type DocumentVariables

type DocumentVariables struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	TypeModifiers string `json:"typeModifiers"`
}

type FoundChildValue

type FoundChildValue struct {
	Name     string
	Value    int64
	Filepath string
}

type FragmentSpec

type FragmentSpec struct {
	Name  string
	ID    int64
	Scope map[string]int64
}

type RawDirectiveArgument

type RawDirectiveArgument struct {
	Name  string `json:"name"`
	ArgId int    `json:"argId"` // if 0, then no valid arg
	Raw   string `json:"raw"`
}

Define structs for unmarshaling directive arguments.

Jump to

Keyboard shortcuts

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