-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Result field to ResolverContext #301
Changes from 5 commits
072363c
e53d224
fabc6f8
09e4bf8
e57464f
c7fd841
568a72e
6ef2035
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ func (ec *executionContext) _{{$object.GQLType}}(ctx context.Context, sel ast.Se | |
ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ | ||
Object: {{$object.GQLType|quote}}, | ||
}) | ||
{{else}} | ||
graphql.GetResolverContext(ctx).Result = obj | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably happen using res around field.gotpl:62, here its going to be repeated for every child There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah... make sense... |
||
{{end}} | ||
|
||
{{if $object.IsConcurrent}} var wg sync.WaitGroup {{end}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is strange. array marshalling isn't a resolver, and it shouldn't need a new context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is right.this change required
default:
case undercase len(remainingMods) > 0 && remainingMods[0] == modList:
.I'll move this code to right place and add some arguments to method signature.
🤔 ❓