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

Use graphql.HasOperationContext in arangodb assembler #1659

Merged
merged 1 commit into from Jan 23, 2024

Conversation

ridhoq
Copy link
Contributor

@ridhoq ridhoq commented Jan 23, 2024

Description of the PR

It seems we're not entering the logic to determine what graphql fields are present in some of the arangodb methods. This is because we are checking ctx.Value("graphql").(graphql.OperationContext) which isn't actually present. This is because the operation context is stored using the value operation_context as seen here. Instead of doing this logic here, we can just call the HasOperationContext function provided by the gqlgen library.

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

Signed-off-by: Ridwan Hoq <ridwanhoq@microsoft.com>
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Collaborator

@pxp928 pxp928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good catch on that

@kodiakhq kodiakhq bot merged commit f393612 into guacsec:main Jan 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants