如何在Python中处理带参数的查询图表

2024-10-02 20:38:15 发布

您现在位置:Python中文网/ 问答频道 /正文

class ProductQuery(graphene.ObjectType):
    products = graphene.List(Product)

    def resolve_products(self, info):
        return get_all_products()

以上是我的代码查询所有产品没有参数。我想按制造商编号查询产品是什么?如何做解析器?在

their official site上没有文档。在


Tags: selfinfogetreturn产品defallproduct