-
-
Notifications
You must be signed in to change notification settings - Fork 153
Support GET requests #151
Description
I am trying to use https://github.com/apollographql/apollo-link-persisted-queries in combination with apollo-upload-client.
When I set { useGETForHashedQueries: true } in the options of the persisted-queries link, network requests fail:
Network error: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.
It seems to me, that the handling of apollo-link-http (https://github.com/apollographql/apollo-link/blob/efd104055f675fae3b24be7b96b009099ac040e7/packages/apollo-link-http/src/httpLink.ts#L119) is missing in
apollo-upload-client/src/index.js
Line 154 in 4d0c29a
| } else options.body = payload |
IMHO it should be possible to add that handling in case of !(files.size), but that would add the complexity of rewriteURIForGET from apollo-link-http to this package...