You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changeling edited this page Jun 7, 2019
·
3 revisions
Tracking page for documentation and example code Style Guide discussion.
Elements discussed and decided:
Example code and snippets should always be copy/paste complete as running code, unless it's a one-liner or short explanatory snippet for which the context is very (very) clear.
Use explicit imports. from graphene import ... rather than import graphene.
Use class arguments instead of class Meta.
Example:
Instead of:
class Human(graphene.ObjectType):
class Meta:
interfaces = (Character, )
starships = graphene.List(Starship)
home_planet = graphene.String()