Skip to content

zdzislaw-s/howtographql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

howtographql

Commits in this repository record my progress in going through graphql-python Tutorial and might be helpful to whoever intends to do that tutorial.

There is a commit that includes Subscriptions, which unfortunately are not covered in the tutorial.

The commits are roughly aligned with the original chapters (with my take on naming and such here and there) and are best followed alongside the tutorial.

Here is the list of commits in chronological order:

6c12b74 Add hackernews/
a3c193c Configure Graphene Django
a549683 Create Links app
3c20bbe Create first Type and Schema
4627900 Introduce GraphiQL
1de772e Mutations
082f846 Create User
7ecd2f2 Query Users
e557a38 Add queries.curl with test queries
82b651b User Authentication
dafefb7 Test Authentication
1602875 Attach Users to Links...
78458a2 Add Votes
b8d6798 Consolidate schemas into hackernews/schema.py
84879cf Relate Links and Votes
8b611ca Rename type names in schema (e.g. s/VoteType/Vote/)
1a5db7e Replace Exception with GraphQLError
f9a4d26 Filter Links
8d8a278 Paginate Links
c447ceb Fix missed s/Vote/VoteModel/
f5eb9bc Add schema.graphql
5771ecc Add subscriptions

schema.graphql

The hackernews/schema.graphql file was created with the following code:

>>> import hackernews.wsgi
>>> from hackernews.schema import schema
>>> with open("schema.graphql", "w") as fo:
...   fo.write(str(schema))