graphql

package
v1.14.10 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

type FieldInfo struct {
	Name      string         `json:"name"`
	Arguments map[string]any `json:"arguments"`
}

FieldInfo represents information about GraphQL Field and it's arguments.

type ParseError

type ParseError struct {
	Message string
	BaseErr error
}

ParseError is an error, representing not being able to parse GraphQL request.

func (ParseError) Error

func (e ParseError) Error() string

func (ParseError) Unwrap

func (e ParseError) Unwrap() error

type QueryInfo

type QueryInfo struct {
	Type       string            `json:"type"`       // Request type (query, mutation, subscription)
	Name       string            `json:"name"`       // Request name
	Parameters map[string]string `json:"parameters"` // Request params (type of requested variables)
	Variables  map[string]any    `json:"variables"`  // Request variables for query
	Fields     []FieldInfo       `json:"fields"`     // List of requested fields, including input variables
}

QueryInfo represents information about GraphQL query, it's params and variables.

func ParseQuery

func ParseQuery(query string) (*QueryInfo, error)

ParseQuery parses GraphQL-request and returns info about it.

type RequestBody added in v1.9.3

type RequestBody struct {
	Query     string         `json:"query"`
	Variables map[string]any `json:"variables"`
}

RequestBody represents information about Request Body for later parsing.

Jump to

Keyboard shortcuts

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