Skip to content

Example of a Python Flask API with a GraphQL interface

Notifications You must be signed in to change notification settings

markparolisi/flask-graphql

Repository files navigation

Flask GraphQL Demo

Installation

  1. Activate a virtual environment

  2. Install dependencies with pip

  3. Install sample data in ./install_database.py

  4. Run server ./server.py

  5. Test service at http://127.0.0.1:5000/

    {
      allEmployees {
        edges {
          node {
            name
            hiredOn
    
            department {
              name
            }
          }
        }
      }
    }
    
    {
      department(id:"RGVwYXJ0bWVudDox"){
        id
        name
        employees {
          edges{
            node {
              name
              hiredOn
            }
          }
        }
      }
    }
    

Code Quality

  • Pylint pylint flask-graphql
  • Nose Unit Tests nosetests tests/

About

Example of a Python Flask API with a GraphQL interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages