Skip to content

Commit

Permalink
update QueryDirectives
Browse files Browse the repository at this point in the history
  • Loading branch information
asamusev committed Jun 14, 2019
1 parent f32571e commit cfdbc39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codegen/generated!.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinitio
ec := executionContext{graphql.GetRequestContext(ctx), e}

buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
{{ if .MutationDirectives -}}
{{ if .QueryDirectives -}}
data := ec._{{.QueryRoot.Name}}Middleware(ctx, op)
{{- else -}}
data := ec._{{.QueryRoot.Name}}(ctx, op.SelectionSet)
Expand Down
2 changes: 1 addition & 1 deletion example/todo/todo.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func New() Config {
todos: []*Todo{
{ID: 1, Text: "A todo not to forget", Done: false, owner: you},
{ID: 2, Text: "This is the most important", Done: false, owner: you},
{ID: 3, Text: "Somebody else's todo", Done: false, owner: them},
{ID: 3, Text: "Somebody else's todo", Done: true, owner: them},
{ID: 4, Text: "Please do this or else", Done: false, owner: you},
},
lastID: 4,
Expand Down

0 comments on commit cfdbc39

Please sign in to comment.