• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

graphql-python/swapi-graphene: GraphQL Starwars API using Graphene and Django

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

graphql-python/swapi-graphene

开源软件地址(OpenSource Url):

https://github.com/graphql-python/swapi-graphene

开源编程语言(OpenSource Language):

Python 68.7%

开源软件介绍(OpenSource Introduction):

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap