从graphql查询创建graphene查询类

时间:2020-01-28 09:58:15

标签: python graphql graphene-python

我有graphql请求:

query {
    users(id: [Int], name_prefix: String) {
        id
        name_prefix
    }
}

我必须为其实现类型对象和根查询对象:

class Users(graphene.ObjectType):
    #...

class UsersQuery:
    """
    Root query object for Users Service
    """

    async def resolve_users(root, info, **args):
        # ...

如何从查询中实现此类?

0 个答案:

没有答案