graphql

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddErrorsAsSpanEvents

func AddErrorsAsSpanEvents(span *tracer.Span, errs []Error, errExtensions []string)

AddErrorsAsSpanEvents attaches the given graphql errors to the span as span events, according to the standard Datadog specification. errExtensions allows to include the given extensions field from the error as attributes in the span events.

func ErrorExtensionsFromEnv

func ErrorExtensionsFromEnv() []string

ErrorExtensionsFromEnv returns the configured error extensions from an environment variable.

func ParseErrorExtensions

func ParseErrorExtensions(errExtensions []string) []string

ParseErrorExtensions validates and cleans up the user provider error extension list.

Types

type Error

type Error struct {
	OriginalErr error
	Message     string
	Locations   []ErrorLocation
	Path        []any
	Extensions  map[string]any
}

Error represents a generic Graphql error.

type ErrorLocation

type ErrorLocation struct {
	Line   int
	Column int
}

ErrorLocation represents each individual member of the locations field of a Graphql error.

Jump to

Keyboard shortcuts

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