-
Notifications
You must be signed in to change notification settings - Fork 6
resolves #159: Add batch argument to fetch data in batches #219
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #219 +/- ##
===========================================
+ Coverage 68.03% 68.21% +0.17%
===========================================
Files 82 82
Lines 7384 7424 +40
Branches 1442 1446 +4
===========================================
+ Hits 5024 5064 +40
Misses 1986 1986
Partials 374 374
Flags with carried forward coverage won't be shown. Click here to find out more.
|
dgarros
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall
infrahub_sdk/client.py
Outdated
| nodes = [] | ||
| related_nodes = [] | ||
| batch_process = await self.create_batch() | ||
| resp = await self.execute_graphql(query=f"query {{ {schema_kind} {{ count }} }}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to move this into a dedicated count method, there's already an issue to track that #158
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now moved it over to using client.count().
infrahub_sdk/client.py
Outdated
| prefetch_relationships: bool = ..., | ||
| partial_match: bool = ..., | ||
| property: bool = ..., | ||
| batch: bool = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud
I'm not sure if batch will be clear enough for the end user ?
As an alternative we could use parallel
any preference @opsmill/customer-success ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have renamed to parallel for now.
Resolves: #159