Skip to content

Use Apollo Client with SvelteKit to Query a GraphQL API: we use the GitHub API to query our repos and learn a bit of SvelteKit along the way.

License

Notifications You must be signed in to change notification settings

rodneylab/sveltekit-graphql-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Rodney Lab sveltekit-graphql-github Github banner

Rodney Lab logo

SvelteKit GraphQL Github

sveltekit-graphql-github

Open in StackBlitz

SvelteKit demo code for using Apollo Client to query a GraphQL API. The demo queries the GitHub GraphQL API to pull metadata on your public repos.

See the Use Apollo Client with SvelteKit for more on how to set this site up. The demo site is live on Render at sveltekit-graphql-github.rodneylab.com

Please drop questions into a comment at the bottom of the post page.

Building and previewing the site

If you're seeing this, you've probably already done this step. Congrats!

git clone https://github.com/rodneylab/sveltekit-graphql-github.git
cd sveltekit-graphql-github
pnpm install # or npm install
pnpm run dev

Building

pnpm run build

You can preview the built app with pnpm run preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

Feel free to jump into the Rodney Lab matrix chat room.