Created Docs and Example Code Style Guide Work: graphene v 3.0 (markdown)

changeling 2019-06-07 15:53:30 -05:00
parent e2ac2a00d1
commit 16f2c148cc

@ -0,0 +1,32 @@
Tracking page for documentation and example code Style Guide discussion.
### Elements discussed and decided:
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()
```
Use:
```
class Human(graphene.ObjectType, interfaces = (Character, )):
starships = graphene.List(Starship)
home_planet = graphene.String()
```
Use f-strings in place of `.format(...)`.
### Open for discussion:
Using `root` instead of `self` or `_` in resolver definitions.
`@staticmethod`?