Playing With GraphQL + Python Flask

Rahul M
HackerNoon.com
2 min readJul 16, 2017

--

A good friend😉 suggested me to learn GraphQL and just when I was looking for resources, HOW TO GRAPHQL was launched.

I went with fundamentals of GraphQL in it and found Graphene later. It’s a GraphQL framework for Python. I was more interested in Graphene-SQLAlchemy.

So I learned those stuff as well and came out with a simple project for using GraphQL with Python-Flask using Graphene-SQLAlchemy.

In the demo project I created a simple table “users” with field id, name, email, username. And, created a schema(schema.py) to

  • Add a new user.
  • Get all users list.
  • Find a user with username.
  • Update username with email ID.

Below are the example screenshots of GraphQL query execution:

Mutation to create a new user
Query to find a user
Mutation to change username

You can try the demo project here. Looking forward to use React with the demo project stack. And do let me know if you find any typo or bugs. 👨‍💻 🙌

--

--

Rahul M
HackerNoon.com

Developer/Whitehat ~ 🍎 WWDC 2017 Scholarship Winner ~ Found security bugs in Apple, Amazon, Facebook, Google, Yahoo, UnitedAirlines & much more. www.rahulm.me