The SvelteKit example demonstrates the power of code generation, when it comes to integrating WunderGraph with frontend frameworks like Svelte.
The SvelteKit example uses the WunderGraph Svelte Query package
Let's start by configuring WunderGraph.
Define an Operation
Use from Svelte
Your operations will be compiled into RPC endpoints. The template will generate TypeScript client, using which we can create Svelte Query client utilities
In Svelte component,
If you are working with SvelteKit, this package provides
prefetchQuery utility to help with SSR
This implementation is based on TanStack Svelte Query's prefetchQuery approach