Documentation ¶
Overview ¶
Example ¶
package main import ( "log" "net/http" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" "github.com/dmathieu/otelgqlgen" ) var es graphql.ExecutableSchema func main() { srv := handler.NewDefaultServer(es) srv.Use(otelgqlgen.New()) http.Handle("/query", srv) 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 SemVersion ¶
func SemVersion() string
SemVersion is the semantic version to be supplied to tracer/meter creation.
Types ¶
type Handler ¶
type Handler interface { graphql.HandlerExtension graphql.ResponseInterceptor graphql.OperationInterceptor graphql.FieldInterceptor }
Handler is the interface for our middleware
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option interface used for setting optional config properties.
func WithComplexityExtensionName ¶
WithComplexityExtensionName allows passing a custom complexity extension name If none is specified, `ComplexityLimit` will be used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
Click to show internal directories.
Click to hide internal directories.