examples/with-solid-start/README.md
This example demonstrates how to use URQL with SolidStart.
createQueryProviderpnpm install
pnpm start
Then open http://localhost:3000 in your browser.
src/app.tsx - Sets up the URQL client and routersrc/routes/index.tsx - Demonstrates createQuery with preloading and SuspenseThe example uses SolidStart's preload function to start fetching data before the route component renders:
export const route = {
preload: () => {
const pokemons = createQuery({ query: POKEMONS_QUERY });
return pokemons(); // Start fetching
},
} satisfies RouteDefinition;
Queries automatically execute on the server during SSR and hydrate on the client without refetching.