-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
@kingsleyzissou As we talked about it this is not going to land anywhere - it is very hacky change and it will work only with the https://graphqlcrud.org spec (like entire offix really) The way I see this being accepted would be to make sane decision to deprecate cache package for general use and make it work for graphback stuff. |
result.push(operationData_1); | ||
} | ||
|
||
} else if(result.items && result.items.find){ |
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.
assumes items
exsit for Pagination and sync (we use the same name)
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.
What is the impact if pagination and sync is not wanted?
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.
Zero. This will just make it work (so this else will never appear).
This can be also used upstream. if you want to wrap your offline data into some container you just need to name variable items
.
Let's make build pass and release it.
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.
Actually there is problem here. If someone will have named field find
it will stop working for them. Chance for that is very low though.
I had much simpler implementation before that used items
for checking but that can actually be field on the object.
CC @Eunovo for context. This is why we want datastore. It is not easy to work wit the cache. Updates are unpredictable and codebase is really hard to manage. This fix is required to have datasync-starter working |
Requires: aerogear/offix#504
I guess it that kind of makes sense because the cache helpers only seem to work with our stack because we make assumptions on how the inputs and return types are formatted (according to our stack). So custom update functions would be required when using a different backend anyway. |
ea07807
to
f7cd23c
Compare
object.items is going to be supported for automatic cache updates. Which means that both deltasync and pagination will work out of the box
f7cd23c
to
d973006
Compare
@kingsleyzissou Ready for review. Verifcation would be to try sample app with the compiled version. I have tested it on the datasync-starter with the container and without container (master) |
Added small fix for 490 |
Released 0.16.0-dev2 |
Add ability to provide cache updates for the pagination/deltasync