handler

package
v0.0.0-...-4d2de29 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package handler defines the HTTP handlers for this GraphQL API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphQL

type GraphQL struct {
	Schema  *graphql.Schema
	Loaders loader.Collection
	Logger  logger
}

The GraphQL handler handles GraphQL API requests over HTTP. It can handle batched requests as sent by the apollo-client.

func (GraphQL) ServeHTTP

func (h GraphQL) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GraphiQL

type GraphiQL struct{}

GraphiQL is an in-browser IDE for exploring GraphiQL APIs. This handler returns GraphiQL when requested.

For more informataion, see https://github.com/graphql/graphiql.

func (GraphiQL) ServeHTTP

func (h GraphiQL) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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