uploads

package
v2.0.0-rc.178 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Path

type Path struct {
	// contains filtered or unexported fields
}

type UploadFinder

type UploadFinder struct {
	// contains filtered or unexported fields
}

UploadFinder is a helper to find upload structs in the arguments of a query it can be used only in context of arguments extraction normalization rule because it iterates one argument at time

func NewUploadFinder

func NewUploadFinder() *UploadFinder

func (*UploadFinder) AddUploadPath

func (v *UploadFinder) AddUploadPath()

func (*UploadFinder) FindUploads

func (v *UploadFinder) FindUploads(operation, definition *ast.Document, variables []byte, argRef int, argInputValueDefinitionRef int) (uploadPathMapping []UploadPathMapping, err error)

func (*UploadFinder) Reset

func (v *UploadFinder) Reset()

type UploadPathMapping

type UploadPathMapping struct {
	VariableName       string // is a variable name holding the direct or nested value of type Upload, example "f"
	OriginalUploadPath string // is a path relative to variables which have an Upload type, example "variables.f"
	NewUploadPath      string // if variable was used in the inline object like this `arg: {f: $f}` this field will hold the new extracted path, example "variables.a.f", if it is an empty, there was no change in the path
}

Jump to

Keyboard shortcuts

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