This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: Lqn3FZGx6jp06mVuEniIu9NTp3dL9l3iAPHl_a_gaCw
Cover

Playing With GraphQL + Python Flask

Written by @rahulmfg | Published on 2017/7/16

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

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:

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. 👨‍💻 🙌

[story continues]


Written by
@rahulmfg
Full Stack Engineer

Topics and
tags
graphql|flask|sqlalchemy
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: Lqn3FZGx6jp06mVuEniIu9NTp3dL9l3iAPHl_a_gaCw