URQL not compatible with new SvelteKit fetch
polyfill
#2533
Labels
needs more info ✋
A question or report that needs more info to be addressable
fetch
polyfill
#2533
Hey folks, from my understanding, SvelteKit has recently adopted
node-fetch
to use as a fetch polyfill, and with it seems to be breaking SSR rendering attempts using SvelteKit with URQL. Attempting to use thefetch
polyfill in the URQL from the server now results in:Error: [Network] Request with GET/HEAD method cannot have body.
An example of an offending
load
function can be found here.urql version & exchanges:
@urql/core
: 2.5.0@urql/exchange-graphcache
: 4.4.3@urql/svelte
: 2.0.2Steps to reproduce
I've updated my
urql-example
repo from the last time I posted here to highlight the issue. Just runyarn dev
and the issue should happen on page load.Expected behavior
The fetch call should function the same as it would in the browser. I'm not 100% this is entirely a URQL repo, as I did some digging and saw some unexpected logic happening inside
node-fetch
, but seeing this is where I saw the issue first, I figured I'd rule it out with you guys before opening any other issues.Actual behavior
Described above.
The text was updated successfully, but these errors were encountered: