requests

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBatchMode

func IsBatchMode(body []byte) bool

Types

type File

type File interface {
	io.Reader
	io.Closer
}

type ParseRequestResponse

type ParseRequestResponse struct {
	Requests    []*Request
	IsBatchMode bool
}

ParseRequestResponse is an resulting object of ParseRequestQuery. It contains requests array and indicator, if request was running in batch mode.

func Parse

func Parse(r *http.Request) (resp *ParseRequestResponse, finalErr error)

type Request

type Request struct {
	Original      *http.Request          `json:"-"`
	Query         string                 `json:"query"`
	Variables     map[string]interface{} `json:"variables"`
	OperationName *string                `json:"operationName"`
}

Request represents single request send via HTTP

type Upload

type Upload struct {
	File     File
	FileName string
}

Upload represent file and it's name

Jump to

Keyboard shortcuts

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