An open API service indexing awesome lists of open source software.

https://github.com/muneeb706/react-graphql-client


https://github.com/muneeb706/react-graphql-client

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# GraphQL API client in React using @apollo/client

In this project we are consuming API's developed in [django-graphql](https://github.com/muneeb706/django-graphql).

Follow the steps to run configure and run this project.

1. Make sure you have the following development environment:
1. [NPM 8.1.3](https://www.npmjs.com/) (You can be flexible with the version but the implementation was tested with this version).
1. [Create React App](https://reactjs.org/docs/create-a-new-react-app.html)
1. Any IDE or text editor of your choice.
1. Access to Command-Line or Terminal.
1. Setup GraphQL API implemented in this [django-graphql](https://github.com/muneeb706/django-graphql) and run it locally.
Most probably, you will get a CORS issue if you run it locally, to avoid this issue make
sure you enable CORS requests and follow instructions in the README file of the GitHub repository.

1. Clone this repository.
1. Open the terminal or command line.
1. Navigate to the location where you cloned this repository and go to react-graphql-client folder where code files are present.
1. Install the dependencies by entering following command:

`npm install`

1. Run the React development server:

`npm start`