https://github.com/mxro/apollo-client-server-tests
Shows how to write tests for Apollo applications (Node.js backend/ React frontend)
https://github.com/mxro/apollo-client-server-tests
Last synced: 5 months ago
JSON representation
Shows how to write tests for Apollo applications (Node.js backend/ React frontend)
- Host: GitHub
- URL: https://github.com/mxro/apollo-client-server-tests
- Owner: mxro
- Created: 2018-12-29T05:43:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-29T06:06:50.000Z (about 7 years ago)
- Last Synced: 2025-07-05T01:03:41.212Z (8 months ago)
- Language: JavaScript
- Size: 205 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - apollo-client-server-tests
README
# apollo-client-server-tests
Shows how to write tests for Apollo applications (Node.js backend/ React frontend)
## Build
```
git clone git@github.com:mxro/ apollo-client-server-tests.git
cd apollo-client-server-tests
lerna bootstrap
```
## Development Environment
To spin up a local development server with hot reload, run:
```
yarn build
yarn watch
```
This will perform hot reloads on the main server component `server-main` and React app `client-main`. To enable hot reloading on other components, also run the following in a different terminal window:
```
yarn watch-componentss
```
## Run Tests
To run all tests, run:
```
yarn test
```
## Deploy
To run production version
```
yarn build
PORT=8081 yarn serve
```
## Based on
- [Extensive GraphQL Testing in 3 minutes](https://hackernoon.com/extensive-graphql-testing-57e8760f1c25)
- [Effective Testing a GraphQL Server with Jest and Apolle](https://medium.com/@nzaghini/properly-test-a-graphql-server-d178241464e7)
- [Apollo Server Getting Started](https://www.apollographql.com/docs/apollo-server/getting-started.html)
- [create-react-app](https://github.com/facebook/create-react-app)
- [How to get create-react-app to work with a Node.js back-end API](https://medium.freecodecamp.org/how-to-make-create-react-app-work-with-a-node-backend-api-7c5c48acb1b0)