Graphene-Python 客户端视图文档

Graphene-Python documentation on clients view

description property on GraphQL's schema elements can be viewed by the client. For example, GraphQL shows the description value for a field object in the type-ahead dropdown that lists fields available inside a selection set. This same description appears on the documentation section。是否可以通过 graphene-gae 添加此类元数据文档?我的设置:

models.py:

class Article(ndb.Model):
    headline = ndb.StringProperty()
    author_key = ndb.KeyProperty(kind='Author')
    created_at = ndb.DateTimeProperty(auto_now_add=True)

import graphene
from graphene_gae import NdbObjectType

Schema.py:

class ArticleType(NdbObjectType):
    class Meta:
        model = Article

class Query(graphene.ObjectType):
    articles = graphene.List(ArticleType)

    @graphene.resolve_only_args
    def resolve_articles(self):
        return Article.query()

schema = graphene.Schema(query=QueryRoot)

我可以添加这样的描述:

headline = ndb.StringProperty(description='Add description here!')

超级简单!