Skip to content
How to structure GraphQL server with flask+graphene
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Flask-GraphQL-Large-Application-Example Awesome


This is how I structure my GraphQL server with Flask + Graphene


This is basic example of large Flask+Graphene server. all essential use examples have been covered and advanced use examples will be added step by step

  • Features
    • Query example
    • Mutauion example
    • Union example
    • Field example
    • Relay example
    • InputObjectType example
    • Dataloader example
    • Middleware example
    • Interfaces example
    • AbstractTypes example
    • Basic authentication example
    • MongoDB example
    • MySQL(SQLAlchemy, PeeWee) example

Project defendencies

  • GraphQL framework
    • Graphene
  • HTTP serving
    • Flask-GraphQL
    • Flask
  • Database ORM
    • Mongoengine
  • Authentication

How to test this example?

This repository implemented minitwit to cover examples. Use the following command to run the server

pip install -r requirements.txt

GraphiQL enabled by default.


not covered

Core components


GraphQL 서버를 구성하는 필드, 쿼리, 뮤테이션을 담고 있습니다.

This directory contains fields, queries, and interactions that make up the GraphQL schema


GraphQL 스키마를 구성하고 구성된 스키마를 Flask 인스턴스에 할당합니다.

Structure GraphQL schema and add schema with flask.add_url_rule


GraphQL 쿼리와 뮤테이션에서 사용하는 필드들

This file contains the fields that make up the GraphQL schema.


GraphQL 쿼리와 뮤테이션에서 사용하는 유니온들

This file contains the unions that make up the GraphQL schema.


이 디렉터리는 쿼리와 쿼리 resolver들로 구성됩니다. 유연한 구조를 위해 resolver들을 독립적인 파일에 담습니다

This directory consists root query class and query resolvers. Place the resolver in an independent file for flexible structure


이 디렉터리는 뮤테이션들로 구성됩니다. 유연한 구조를 위해 뮤테이션들을 독립적인 파일에 담습니다

This directory consists mutations. Place the mutation in an independent file for flexible structure

I refered


Syrus Akbary




Designing GraphQL mutations
Authorization in GraphQL
GraphQL ansd authentication

Library Docs


You can’t perform that action at this time.