Skip to content

Commit

Permalink
add ParentObject field to ResolverContext
Browse files Browse the repository at this point in the history
  • Loading branch information
vvakame committed Aug 21, 2018
1 parent 2c4e6cb commit 072363c
Show file tree
Hide file tree
Showing 12 changed files with 1,524 additions and 1,141 deletions.
2 changes: 1 addition & 1 deletion codegen/templates/data.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codegen/templates/field.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
Object: {{$object.GQLType|quote}},
Args: {{if $field.Args }}args{{else}}nil{{end}},
Field: field,
{{if not $object.Root}}ParentObject: obj,{{end}}
}
ctx = graphql.WithResolverContext(ctx, rctx)
resTmp := ec.FieldMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
Expand Down

0 comments on commit 072363c

Please sign in to comment.