guac
guac copied to clipboard
Decouple backend specific config from guacgql cmd
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
-sflag togit commit. - [ ] All new changes are covered by tests
- [ ] If GraphQL schema is changed,
make generatehas been run - [ ] If GraphQL schema is changed, GraphQL client updates/additions have been made
- [ ] If OpenAPI spec is changed,
make generatehas been run - [ ] If ent schema is changed,
make generatehas been run - [ ] If
collectsubprotobuf has been changed,make protohas been run - [ ] All CI checks are passing (tests and formatting)
- [ ] All dependent PRs have already been merged