diff --git a/Docs-and-Example-Code-Style-Guide-Work:-graphene-v-3.0.md b/Docs-and-Example-Code-Style-Guide-Work:-graphene-v-3.0.md new file mode 100644 index 0000000..818f03c --- /dev/null +++ b/Docs-and-Example-Code-Style-Guide-Work:-graphene-v-3.0.md @@ -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`? \ No newline at end of file