Hi dwiel, you mean fields inside types? (as class attributes?)
If so, putting the attributes inside a function is usually for lazy resolving the fields.<p>Sometimes the types could be defined after the class definition. In this case, you can use strings for reference field types.
Something like:<p>class User(graphene.ObjectType):
    friends = graphene.Field(&#x27;self&#x27;) # &#x27;User&#x27; would work too.