Skip to content

Support GET requests #151

@JohannesLamberts

Description

@JohannesLamberts

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

} 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...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions