How SvelteKit & GraphQL plays well together
summary
A live demo wires SvelteKit to a GraphQL endpoint using Houdini: project init, generated schema, and a +page.gql that produces typed stores for SSR and client navigation. Components embed GraphQL fragments so data requirements live with UI (showing fragment masking), pagination and loading directives fetch two items per page and show placeholders, mutations append a new category and update the list with a single GraphQL request, and a generated persisted queries.json enables hashed queries; server fixes (dataloaders/joins) solve n+1 without frontend changes.
AI-written summary · about
