[英]how to import graphql schema to graphene-python program?
How do I import an existing graphql schema (example below) into a graphene program instead of defining classes in python to create the schema? 如何将现有的graphql架构(下面的示例)导入到石墨烯程序中,而不是在python中定义类来创建架构?
type Hello {
name: String
}
type Query {
hello: Hello!
}
schema {
query: Query
}
You can't. 你不能。 Graphene needs the class definitions to act upon them, especially your resolver implementations.
石墨烯需要类定义来对它们起作用,尤其是你的解析器实现。
There is no codegen for graphql to python classes at this moment. 此时graphgi到python类没有codegen。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.