Remix example demonstrates how to integrate WunderGraph with Remix.run.
Let's start by configuring WunderGraph. We will use the SpaceX API as an example.
What's notable here is that we're using
templates.typescript.client to generate our base client that is used by SWR
Next up is setting up the client and SWR hooks.
WunderGraph comes with a powerful framework for generating code. Here we are creating fully typed SWR hooks based on the operations of our WunderGraph application.
Define an Operation
Run a Query
Fetch data inside a loader, using the WunderGraph client.