This app was made for this blog post, in which we learn "How to build a book review app with Svelte, urql and Slash GraphQL".
The blog post teaches you how to build a GraphQL app with:
Slash GraphQL lets you build GraphQL apps without worrying about deployments or translating to GraphQL from other storage domains - it’s just GraphQL, start to finish.
Clone the repo with.
git clone https://github.com/dgraph-io/svelte-urql-example.git
cd svelte-urql-example
Note that you will need to have Node.js installed.
The accompanying blog post tells you how to get yourself a Slash GraphQL account and deploy a GraphQL backend for this example app.
Then, install the dependencies...
cd svelte-urql-example
npm install
Edit src/App.svelte
, on line 12 replace "YOUR-SLASH-ENDPOINT" with your Slash GraphQL endpoint.
...then start Rollup:
npm run dev
Navigate to localhost:5000. You should see your app running.
If you're using Visual Studio Code we recommend installing the official extension Svelte for VS Code. If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.