guac icon indicating copy to clipboard operation
guac copied to clipboard

Decouple backend specific config from guacgql cmd

Open robert-cronin opened this issue 1 year ago • 0 comments

Description of the PR

Splitting out #2243 into two PRs, this one being the more aspirational change because it attempts to refactor more of the CLI towards modularity.

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.
  • This PR attempts to decouple the backend implementations (including their arg parsing) from the core guacgql cmd code as a first step to better modularity.
  • The main change here is: a new mechanism to register the flags (config) of the backends alongside the existing function to register new backends. This takes the arg for any specific backend out of the guacgql cmd.

PR Checklist

  • [x] 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 avatar Oct 31 '24 02:10 robert-cronin