Nhost & Svelte Apollo
A sample Svelte 3 app to demonstrate usage of Nhost app using Hasura GraphQL Queries, Mutations and Subscriptions with svelte-apollo.
Get started
- Clone the repository
git clone https://github.com/nhost/nhost
cd nhost
- Install dependencies
cd examples/svelte-apollo
npm install
Get the app URL (something like https://.nhost.run)
- Make Changes in apollo.js with your URI
Go to the Data tab and move to Hasura Console.
Create author table:

Similarly, create an article table with the following data model:
table: article
columns: id, title, content, author_id (foreign key to author table's id) and created_at
Now create a relationship from article table to author table by going to the Relationships tab.
Start the app
npm run dev