-
Notifications
You must be signed in to change notification settings - Fork 68
[AL-4886] Introduce ModelSlice #931
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
| return PaginatedCollection( | ||
| client=self.client, | ||
| query=query_str, | ||
| params={'id': self.uid}, |
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.
according to gql above, $first is required, but I do not see it in the params. Is it ok?
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.
prob handled in PaginatedCollection?
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.
| query=query_str, | ||
| params={'id': self.uid}, | ||
| dereferencing=['getDataRowIdsBySavedQuery', 'nodes'], | ||
| obj_class=lambda _, data_row_id: data_row_id, |
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.
not following here... according to PaginatedCollection documentation, obj_class is a class of an object...
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.
That documentation is 4 years old, I think it's outdated. I was actually just copying the code from CatalogSlice here 😅
|
The change looks good, @kozikkamil can we add a basic fuse test for the method? |
It won't actually be giving any value though. We'll be effectively unit testing PaginatedCollection class, which I am sure has enough coverage already from the e2e tests. It seems like it's not worth to spend the time right now to set that up. ModelSlice has basically no logic in itself |
IMO we should have a fuse test that would catch for example the case where the name of public method has been changed accidentally, or it has been removed at all. If we have something mentioned in SDK docs we should be sure that it's in the code too. Not going to block this though |
Adds the new ModelSlice entity and get method