Skip to content
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

Redundant call to graphql.WithOperationContext #1592

Closed
AndrewWPhillips opened this issue Aug 30, 2021 · 2 comments
Closed

Redundant call to graphql.WithOperationContext #1592

AndrewWPhillips opened this issue Aug 30, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@AndrewWPhillips
Copy link

What happened?

Stepping through the code and it seems that the same OperationContext is added twice to the active context.Context. This happens just before the call to exec.DispatchOperation at:
https://github.com/99designs/gqlgen/blob/master/graphql/handler/transport/http_post.go#L51

then at the top of exec.DispathcOperation at:
https://github.com/99designs/gqlgen/blob/master/graphql/executor/executor.go#L90

What did you expect?

I expected to see only one call to graphql.WithOperationContext(). I could be wrong but it seems there is a redundant call.

Minimal graphql.schema and models to reproduce

versions

  • gqlgen version? v0.13.0
  • go version? go version go1.16.6 windows/amd64
  • dep or go modules? Go modules
@lwc lwc added the good first issue Good for newcomers label Sep 17, 2021
@KunalSin9h
Copy link

@lwc close this issue, it its fixed.

@alexandear
Copy link
Contributor

@StevenACoffman please close issue, it's fixed via #1641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants