gqlapollotracing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Unlicense Imports: 4 Imported by: 2

Documentation

Overview

Example
package main

import (
	"log"
	"net/http"

	"github.com/99designs/gqlgen-contrib/gqlapollotracing"
	"github.com/99designs/gqlgen/graphql"
	"github.com/99designs/gqlgen/handler"
)

var es graphql.ExecutableSchema

func main() {
	handler := handler.GraphQL(
		es,
		handler.RequestMiddleware(gqlapollotracing.RequestMiddleware()),
		handler.Tracer(gqlapollotracing.NewTracer()),
	)
	http.Handle("/query", handler)

	if err := http.ListenAndServe(":8080", nil); err != nil {
		log.Fatal(err)
	}
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracer

func NewTracer() graphql.Tracer

func RequestMiddleware

func RequestMiddleware() graphql.RequestMiddleware

func SetTimeNowFunc

func SetTimeNowFunc(f func() time.Time)

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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