This example doesn't implement any authentication provider. You will need to add one to use this example in production — learn more.
- Run
npx degit grafbase/grafbase/examples/react-apollo-relay-pagination grafbase-with-react-apollo-relay-paginationto clone this example - Change directory into the new folder
cd grafbase-with-react-apollo-relay-pagination - Run
npm install - Run
npx grafbase@latest devin your terminal - Populate the backend with some
Postentries using a GraphQL mutation (make sure to repeat this a few times with differenttitlevalues):
mutation {
postCreate(input: { title: "Grafbase" }) {
post {
id
}
}
}- In another terminal, run
npm startand visithttp://localhost:3000
To learn more about Grafbase, take a look at the following resources:
- Grafbase — learn about Grafbase features and API.
- Pagination — learn about Grafbase pagination API.
To learn more about Apollo Client, take a look at the following resources:
- Apollo Client Documentation - learn about Apollo Client.
- Relay style pagination — learn about Relay style pagination.