Skip to content

Example of a Python Flask backend and GraphQL API with React frontend.

Notifications You must be signed in to change notification settings

Darth-Knoppix/flask-graphql-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask GraphQL React

Example of a Python Flask backend and GraphQL API with React frontend.

Built as an example for the tutorial How to create a React + Flask + GraphQL Project on Benevolent Bytes by Seth Corker.

Server with Flask

Flask is a lightweight Python server which can easily supply a GraphQL API.

GraphQL with Ariadne

Ariadne allows the creation of a GraphQL of API from a schema. It's easy to use and connects well with Flask.

Frontend with React

Demonstrates queries and mutations for our API with a simple React frontend.

How to run

Clone the repo then:

Server

Navigate to the server folder cd server, install dependencies (use a virtual environment if you wish) run python server.py to start the backend. You should be able to access the GraphQL playground at localhost:5000

Client

Navigate to the client folder cd client, install dependencies with yarn and run run the frontend server, yarn start. You should be able to access the frontend at localhost:3000. You can now start communicating with the backed via the React UI.

About

Example of a Python Flask backend and GraphQL API with React frontend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published