Hi 馃憢
I was trying urql with NextJS and I'm getting fetch is not defined in the method executeQuery in file urql.js.
Installed isomorphic-unfetch hoping it would solve the problem but it persists.
What am i missing? 馃
We don't have any hard dependency on fetch to decrease our bundle size, since ultimately exchanges like the fetchExchange are optional.
But since isomorphic-unfetch is just a polyfill you can apply it before creating your urql client 馃憤
As described in their docs:
import 'isomorphic-unfetch';
https://www.npmjs.com/package/isomorphic-unfetch
Hope this helps 馃憤
Yep that works. Thanks 馃檹
Most helpful comment
We don't have any hard dependency on fetch to decrease our bundle size, since ultimately exchanges like the
fetchExchangeare optional.But since
isomorphic-unfetchis just a polyfill you can apply it before creating your urql client 馃憤As described in their docs:
https://www.npmjs.com/package/isomorphic-unfetch
Hope this helps 馃憤