Skip to content

Commit e767024

Browse files
authored
Update README.md
1 parent ce6dc97 commit e767024

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ _, err := graphql.ParseSchema(starwars.Schema, nil, graphql.Tracer(opentracing.T
205205
// ...
206206
```
207207

208+
If you need to implement a custom tracer the library would accept any tracer which implements the interface below:
209+
```go
210+
type Tracer interface {
211+
TraceQuery(ctx context.Context, queryString string, operationName string, variables map[string]interface{}, varTypes map[string]*introspection.Type) (context.Context, func([]*errors.QueryError))
212+
TraceField(ctx context.Context, label, typeName, fieldName string, trivial bool, args map[string]interface{}) (context.Context, func(*errors.QueryError))
213+
TraceValidation(context.Context) func([]*errors.QueryError)
214+
}
215+
```
216+
208217

209218
### [Examples](https://github.com/graph-gophers/graphql-go/wiki/Examples)
210219

0 commit comments

Comments
 (0)