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

Export getGraphqlServer and accept initialized backend #2243

Merged

Conversation

robert-cronin
Copy link
Contributor

@robert-cronin robert-cronin commented Oct 30, 2024

Description of the PR

Fixes #2240

Some notes:

  • I intended to restrict this PR to refactoring only instead of altering functionality, so if there is any change to functionality it was not intentional, and we should probably flag and revert.
  • The main change here is: a refactor of getGraphqlServer to allow it to be used programmatically by out-of-tree backends, allows the backend to be passed in as-is without relying on parsing of the flags for config.

cc @ridhoq

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 GraphQL schema is changed, GraphQL client updates/additions have been made
  • If OpenAPI spec is changed, make generate has been run
  • If ent 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

@robert-cronin robert-cronin force-pushed the feat/support-out-of-tree-backends branch from 6fa81c4 to 76a6143 Compare October 31, 2024 01:59
@pull-request-size pull-request-size bot added size/S and removed size/L labels Oct 31, 2024
@robert-cronin robert-cronin changed the title Refactor guacgql command to support out-of-tree backends Export GetGraphqlServer and accept initialized backend Oct 31, 2024
@robert-cronin robert-cronin marked this pull request as ready for review October 31, 2024 02:08
@robert-cronin robert-cronin changed the title Export GetGraphqlServer and accept initialized backend Export getGraphqlServer and accept initialized backend Oct 31, 2024
@pxp928 pxp928 added the needs-review Needs writer LGTM label Nov 8, 2024
Copy link
Contributor

@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

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

LGTM, but request a slight refactor to expose this through a package instead of from the cmd package

cmd/guacgql/cmd/server.go Outdated Show resolved Hide resolved
@robert-cronin robert-cronin force-pushed the feat/support-out-of-tree-backends branch 2 times, most recently from 7494fef to 8680075 Compare November 11, 2024 04:39
@pull-request-size pull-request-size bot added size/M and removed size/S labels Nov 11, 2024
@robert-cronin robert-cronin force-pushed the feat/support-out-of-tree-backends branch from 8680075 to 8cdd7ac Compare November 14, 2024 23:19
@kodiakhq kodiakhq bot merged commit bc51756 into guacsec:main Nov 15, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Needs writer LGTM size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Support for Out-of-Tree GUAC Backends
4 participants