protocol

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Result json.RawMessage `json:"result"`
}

type GQLBatchRequest

type GQLBatchRequest struct {
	Batch       []GQLRequest `json:"batch"`
	Transaction bool         `json:"transaction"`
}

GQLBatchRequest is the payload for GraphQL queries

type GQLBatchResponse

type GQLBatchResponse struct {
	Errors []GQLError    `json:"errors"`
	Result []GQLResponse `json:"batchResult"`
}

type GQLError

type GQLError struct {
	Message         string           `json:"error"`
	UserFacingError *UserFacingError `json:"user_facing_error"`
	Path            []string         `json:"path"`
}

GQLError is a GraphQL Message

func (*GQLError) Error

func (e *GQLError) Error() string

func (*GQLError) RawMessage

func (e *GQLError) RawMessage() string

type GQLRequest

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

GQLRequest is the payload for GraphQL queries

type GQLResponse

type GQLResponse struct {
	Data       Data                   `json:"data"`
	Errors     []GQLError             `json:"errors"`
	Extensions map[string]interface{} `json:"extensions"`
}

GQLResponse is the default GraphQL response

type Meta

type Meta struct {
	Target interface{} `json:"target"` // can be of type []string or string
}

type UserFacingError

type UserFacingError struct {
	IsPanic   bool   `json:"is_panic"`
	Message   string `json:"message"`
	Meta      Meta   `json:"meta"`
	ErrorCode string `json:"error_code"`
}

func (*UserFacingError) Error

func (e *UserFacingError) Error() string

Jump to

Keyboard shortcuts

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