fix: refactor OpenHexaClient to allow usage in both CLI and SDK without circular dependency (HEXA-1314)#279
Merged
yolanfery merged 5 commits intoJun 25, 2025
Conversation
yolanfery
commented
Jun 25, 2025
|
|
||
| @property | ||
| def countries(self): | ||
| def countries(self) -> list[GetCountriesWorkspaceCountries]: |
Contributor
Author
There was a problem hiding this comment.
Now we can use types without circular dependency 🎉
nazarfil
approved these changes
Jun 25, 2025
| url: GraphQL API URL. | ||
| token: Authentication token. | ||
| """ | ||
| self.token = token |
|
|
||
| @property | ||
| def countries(self): | ||
| def countries(self) -> list[GetCountriesWorkspaceCountries]: |
bramj
approved these changes
Jun 25, 2025
bramj
left a comment
Contributor
There was a problem hiding this comment.
I think this is a great step forward, nice work! 👏
So if I understand it correctly, since the openhexa-toolbox already depends on the SDK, we can simply use the BaseOpenHexaClient and benefit from all this without any duplication? That's great!
Contributor
Author
Agreed, thanks !
Correct, it just needs advertising once we have extended it to support more queries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #278 and #277 we faced issue with circular dependency for
OpenHexaClient.This PR is about extracting and refactoring the
OpenHexaClientto allow usage in both the CLI and the SDKChanges
OpenHexaClientto make it a clear interface