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

Introduce a hybrid client that can multiplex across the GraphQL & REST APIs #257

Merged
merged 10 commits into from
Jan 19, 2025

Conversation

dknowles2
Copy link
Owner

This hybrid client will prefer the GraphQL API in most circumstances, but will fall back to the REST API if it thinks its querying too much data. It also understands how to back off from the REST API and will instead return cached data to prevent server throttling.

The interface should be the same as the GraphQL client, meaning it's largely a drop-in replacement (except for needing a different Auth object that contains an api_key for communicating with the REST API.

This PR also includes cleanups to the REST client to differentiate it from the hydrawiser-compatible client.

There are also a number of other cosmetic and test fixes included.

@dknowles2 dknowles2 added the enhancement New feature or request label Jan 19, 2025
@dknowles2 dknowles2 merged commit 817e559 into main Jan 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant