Clax

Clax

A sample Svelte 3 app to demonstrate usage of Nhost app using Hasura GraphQL Queries, Mutations and Subscriptions with svelte-apollo.

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

  1. Clone the repository
git clone https://github.com/nhost/nhost
cd nhost
  1. Install dependencies
cd examples/svelte-apollo
npm install
  1. Get the app URL (something like https://.nhost.run)

    • Make Changes in apollo.js with your URI
  2. 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.

  3. Start the app

npm run dev

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes