-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Turn on query diffing #42
Comments
@jbaxleyiii question: Should the information about what the server supports live in the network interface? For example, this would be a flag |
@stubailo I think so. To me the network interface both declares how to communicate to an external source, as well as other potential information. For instance, at some point I think we build authentication that is passed / provided by the network interface. This keeps the main data logic separate from the data source making it possible to point to different types of graph servers, as well as opens the option to setup a client side graph endpoint for local state |
Yep, that's what I was thinking as well. Might build passing options about what the server supports as part of #43 |
We have the capability to diff a new query against the the store to avoid fetching data we already have. Currently, that functionality is not exposed through
index.js
at all. There are some tests, but any new query passed towatchQuery
is run against the server in its entirety. We should add this functionality.Options
There are 3 variants (with small deviations) of what you might want to do when fetching a new query:
onResult
callback when the server response returnsonResult
immediately with partial data, then again with complete dataThis means there are several bits of data required to pick a fetching strategy for a particular query:
(1) should be determined when instantiating the client, and (2) and (3) should be options to
watchQuery
.Defaults
I think the default should be the least surprising set of options, which makes no assumptions about the environment:
There's a small cost that uninformed users will assume the client doesn't have these features, but it's up to us to make them easily discoverable.
The text was updated successfully, but these errors were encountered: