This repo is a the demo code for how to use @apollo/client
's MockedProvider
to mock your graph so that you can build your frontend application, even if the graph is not ready yet.
The full article explaining how this is done can be found at here: https://medium.com/swlh/building-frontend-applications-by-mocking-your-entire-api-with-testing-tools-2f050359677f
This project was bootstrapped with Create React App.
- Clone the repo
git clone https://github.com/laij84/apollo-mocked-provider.git
- Install dependencies
In the project directory, you can run:
yarn
- Start the application
In the project directory, you can run:
yarn start