This package provides a type-safe integration of Solid Query with WunderGraph. Solid Query is a data fetching library for Solid.js.
Before you can use the hooks, you need to modify your code generation to include the base typescript client.
Now you can configure the hooks. Create a new file, for example
lib/wundergraph.ts and add the following code:
App.tsx add QueryClientProvider:
Now you can use the hooks in your components:
createQuery (Live query)
You can use the
queryKey helper function to create a unique key for the query in a typesafe way. This is useful if you want to invalidate the query after mutating.
You can use all available options from Solid Query .