Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/the-road-to-graphql/react-apollo-client-testing-example
A React with Apollo Client application with a mocked GraphQL server and tested Query and Mutation components.
https://github.com/the-road-to-graphql/react-apollo-client-testing-example
apollo apollo-client apollo-client-testing graphql-schema mocking react reactjs testing
Last synced: 28 days ago
JSON representation
A React with Apollo Client application with a mocked GraphQL server and tested Query and Mutation components.
- Host: GitHub
- URL: https://github.com/the-road-to-graphql/react-apollo-client-testing-example
- Owner: the-road-to-graphql
- Created: 2018-06-04T02:34:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T08:43:57.000Z (over 4 years ago)
- Last Synced: 2024-05-18T19:17:08.786Z (6 months ago)
- Topics: apollo, apollo-client, apollo-client-testing, graphql-schema, mocking, react, reactjs, testing
- Language: JavaScript
- Homepage: https://www.robinwieruch.de/react-apollo-client-testing
- Size: 2.86 MB
- Stars: 17
- Watchers: 4
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-react-graphql - Testing Apollo Client in React
README
# react-apollo-client-testing-example
[![Build Status](https://travis-ci.org/the-road-to-graphql/react-apollo-client-testing-example.svg?branch=master)](https://travis-ci.org/the-road-to-graphql/react-apollo-client-testing-example) [![Slack](https://slack-the-road-to-learn-react.wieruch.com/badge.svg)](https://slack-the-road-to-learn-react.wieruch.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/the-road-to-graphql/react-apollo-client-testing-example.svg)](https://greenkeeper.io/)
A minimal React application using Apollo Client with a **mocked** GitHub's GraphQL API by implementing an own GraphQL schema. [Read more about it here.](https://www.robinwieruch.de/graphql-server-mock-apollo-client/) In addition, it uses the mocked GraphQL server to conduct tests for Apollo's Query and Mutation components. [Read more about it here.](https://www.robinwieruch.de/react-apollo-client-testing)
## Installation
* `git clone [email protected]:the-road-to-graphql/react-apollo-client-testing-example.git`
* cd react-apollo-client-testing-example
* npm install
* [add your own REACT_APP_GITHUB_PERSONAL_ACCESS_TOKEN in .env file](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
* scopes/permissions you need to check: admin:org, repo, user, notifications
* npm test## Want to learn more about React + GraphQL + Apollo?
* Don't miss [upcoming Tutorials and Courses](https://www.getrevue.co/profile/rwieruch)
* Check out current [React Courses](https://roadtoreact.com)