- Run
npx degit grafbase/grafbase/examples/react-apollo grafbase-with-react-apolloto clone this example - Change directory into the new folder
cd grafbase-with-react-apollo - Run
cp .env.example .env - Open
.envin your code editor and provide your Grafbase API endpoint, API key, a issuer URL, and JWT secret. - Run
cp grafbase/.env.example grafbase/.envand provide the same issuer and secret you have in your root.env - Run
npm installoryarn installto install dependencies - Run
npx grafbase@latest devin your terminal - In another terminal, run
npm startoryarn startand visithttp://localhost:3000
To learn more about Grafbase, take a look at the following resources:
- Grafbase - learn about Grafbase features and API.
To learn more about Next.js, take a look at the following resources:
- React Documentation
- Apollo Client Documentation - learn about Apollo Client.