Documentation ¶
Overview ¶
Example ¶
package main import ( "log" "net/http" "github.com/99designs/gqlgen-contrib/gqlopencensus" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" ) var es graphql.ExecutableSchema func main() { // NOTE: requires setting of Exporter // trace.RegisterExporter(exporter) srv := handler.NewDefaultServer(es) srv.Use(gqlopencensus.Tracer{}) http.Handle("/query", srv) if err := http.ListenAndServe(":8080", nil); err != nil { log.Fatal(err) } }
Output:
Index ¶
- type Tracer
- func (a Tracer) ExtensionName() string
- func (a Tracer) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error)
- func (a Tracer) InterceptOperation(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler
- func (a Tracer) Validate(schema graphql.ExecutableSchema) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracer ¶
func (Tracer) ExtensionName ¶
func (Tracer) InterceptField ¶
func (Tracer) InterceptOperation ¶
func (a Tracer) InterceptOperation(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler
Click to show internal directories.
Click to hide internal directories.