svelte-apollo icon indicating copy to clipboard operation
svelte-apollo copied to clipboard

Compatible with svelte@next?

Open janosh opened this issue 5 years ago • 4 comments

If I run

mkdir svelte-next && cd svelte-next && npm init svelte@next && npm i && npm i -D svelte-apollo

and then try to import setClient

<script>
  import Counter from "$components/Counter.svelte";
  import { setClient } from "svelte-apollo";
</script>

in index.svelte, I get

500 Failed to resolve module specifier "process". Relative references must start with either "/", "./", or "../".

Can this be worked around or does svelte-apollo need an update to be used with svelte@next?

janosh avatar Dec 12 '20 11:12 janosh

I don't really know what I'm doing, but I think this tip has helped: https://github.com/snowpackjs/snowpack/discussions/1477#discussioncomment-122780

georgecrawford avatar Dec 30 '20 23:12 georgecrawford

did you able to get this working on svelte@next? i'm still trying to findout how to implement graphql client on it..

riez avatar Jan 03 '21 13:01 riez

@riez Nope, I ended up using simple fetch requests to my GraphQL endpoint instead of an Apollo client. No caching that way, but I'm requesting relatively small amounts of data anyway.

janosh avatar Jan 03 '21 14:01 janosh

I see .. I was thinking to implementing that way too.. but right now I'm trying another package before that..

riez avatar Jan 03 '21 14:01 riez