• Stars
    star
    172
  • Rank 214,017 (Top 5 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GraphQL Starwars API using Graphene and Django

GraphQL SWAPI using Graphene

This is a integration example of Graphene in Django. View demo

Structure

All the models and fixtures are based in the original swapi project.

The schema (where all the magic happens) is in starwars/schema.py.

Look ma, a GraphQL integration with Django models in less than 150 LOC!

Deploying locally

You can also have your own GraphQL Starwars example running on locally. Just run the following commands and you'll be all set!

git clone [email protected]:graphql-python/swapi-graphene.git
cd swapi-graphene

# Install the requirements
pip install -r requirements_base.txt

# Collect static data
python manage.py collectstatic

# Setup the db and load the fixtures
python manage.py migrate

Once you have everything done, just run:

python manage.py runserver

Open your browser and visit localhost:8080 et voilá!

Deploying on Heroku

To get your own GraphQL Starwars example running on Heroku, click the button below:

Deploy

Fill out the form, and you should be cooking with gas in a few seconds.

More Repositories

1

graphene

GraphQL framework for Python
Python
7,978
star
2

graphene-django

Build powerful, efficient, and flexible GraphQL APIs with seamless Django integration.
Python
4,235
star
3

gql

A GraphQL client in Python
Python
1,474
star
4

flask-graphql

Adds GraphQL support to your Flask application.
Python
1,316
star
5

graphene-sqlalchemy

Graphene SQLAlchemy integration
Python
971
star
6

graphql-core

A Python 3.6+ port of the GraphQL.js reference implementation of GraphQL.
Python
498
star
7

graphql-core-legacy

GraphQL base implementation for Python (legacy version – see graphql-core for the current one)
Python
375
star
8

graphene-mongo

Graphene MongoEngine integration
Python
285
star
9

graphql-ws

GraphQL websockets
Python
271
star
10

graphene-pydantic

Integrate GraphQL with your Pydantic models
Python
220
star
11

sanic-graphql

Adds GraphQL support to your Sanic app.
Python
149
star
12

graphql-relay-py

A library to help construct a graphql-py server supporting react-relay
Python
145
star
13

aiohttp-graphql

Adds GraphQL support to your aiohttp app.
Python
118
star
14

graphene-gae

GraphQL Support for Google AppEngine [DEPRECATED - Looking for maintainers]
Python
117
star
15

graphql-server

This is the core package for using GraphQL in a custom server easily
Python
114
star
16

gql-next

A Python GraphQL Client library providing ability to validate and make type-safe GraphQL calls
Python
76
star
17

graphene-tornado

Python
52
star
18

graphene-federation

Federation implementation for Graphene.
Python
40
star
19

webob-graphql

GraphQL integration for WebOb based frameworks: Pyramid, Pylons...
Python
28
star
20

GraphQL-SublimeText

GraphQL language syntax for SublimeText
17
star
21

graphene-python.org

Graphene-Python.org official website
JavaScript
6
star