graphql

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler added in v1.2.0

func Handler(root any, content embed.FS) *relay.Handler

func String

func String(content embed.FS) (string, error)

String reads the .graphql schema files from the embed.FS, concatenating the files together into one string.

If this method complains about not finding functions AssetNames() or MustAsset(), run `go generate` against this package to generate the functions.

func View added in v1.2.0

func View(handleMethod HttpMethod, handlePath string) http.HandlerFunc

Types

type HttpMethod added in v1.2.0

type HttpMethod string
const (
	Post              HttpMethod = http.MethodPost
	Get               HttpMethod = http.MethodGet
	Put               HttpMethod = http.MethodPut
	Delete            HttpMethod = http.MethodDelete
	DefaultHandlePath            = "/graphql"
	DefaultViewPath              = "/view"
)

Jump to

Keyboard shortcuts

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