You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
Is there a way to combine automatic persisted queries with a batched link? Guessing not yet, at least it didn't work if I replaced the concat to the HTTP link with a batched instance, but thought I'd ask.
Great idea, really reduces bandwidth :)
Edit: to be more detailed, this is how I tried to combine them:
import { BatchHttpLink } from 'apollo-link-batch-http';
import { createPersistedQueryLink } from 'apollo-link-persisted-queries';
const http = new BatchHttpLink({ uri: httpEndpointUrl });
const persistHttp = createPersistedQueryLink().concat(http);
It does send the queries, but the negotiation of hashes doesn't happen so there is no bandwidth savings. The batch elements have both the complete query text as well as the hash extension added to them.
The text was updated successfully, but these errors were encountered:
@wmertens I suspect that it will, because on further reflection I think the reason it doesn't work with BatchHttpLink today is that it is using apollo-fetch which may have a different internal API (speculating here) than the plain old HTTP link. It definitely works a lot different if you want to pass credentials with requests.
Is there a way to combine automatic persisted queries with a batched link? Guessing not yet, at least it didn't work if I replaced the concat to the HTTP link with a batched instance, but thought I'd ask.
Great idea, really reduces bandwidth :)
Edit: to be more detailed, this is how I tried to combine them:
It does send the queries, but the negotiation of hashes doesn't happen so there is no bandwidth savings. The batch elements have both the complete query text as well as the hash extension added to them.
The text was updated successfully, but these errors were encountered: