-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix op to rc in comment of FieldContext.Child #3333
Conversation
graphql/context_field.go
Outdated
@@ -36,8 +36,8 @@ type FieldContext struct { | |||
// | |||
// srv.AroundFields(func(ctx context.Context, next graphql.Resolver) (interface{}, error) { | |||
// fc := graphql.GetFieldContext(ctx) | |||
// op := graphql.GetOperationContext(ctx) | |||
// collected := graphql.CollectFields(opCtx, fc.Field.Selections, []string{"User"}) | |||
// rc := graphql.GetOperationContext(ctx) |
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.
Actually, there are some variations in the naming of the variable returned from graphql.GetOperationContext()
(e.g., rc
, opCtx
, rctx
) in gqlgen repository, but rc
is the most common.
Hey, I appreciate making things more consistent, but it feels unintuitive for the |
ee552b6
to
1db51ae
Compare
@StevenACoffman maybe I changed them all. |
Thanks so much! This has confused a number of people, so I appreciate you cleaning it up! Looking forward to future contributions from you! |
Fixed the implementation in the comments.
I have: