zapx: Index | Files

package zgql

import ""

Package zgql provides zap extensions and middleware for `99designs/gqlgen` (

TODO: examples


Package Files

doc.go gql.go

func GraphCtxHandler Uses

func GraphCtxHandler(next http.Handler) http.Handler

GraphCtxHandler injects request fields into context for use with the GraphQL request logger. Should wrap the mux used to handle the GraphQL resolver.

func NewMiddleware Uses

func NewMiddleware(l *zap.Logger, f LogFields) graphql.RequestMiddleware

NewMiddleware returns a logger for use with GraphQL queries

type LogFields Uses

type LogFields map[string]func(context.Context) string

LogFields customizes the fields logged

Package zgql imports 6 packages (graph) and is imported by 1 packages. Updated 2019-09-18. Refresh now. Tools for package owners.