如何使用Graphene-Python定义自定义指令并在类型上使用它?

时间:2019-06-11 19:38:39

标签: graphql graphene-python

我尝试查看文档以弄清楚如何完成此操作,但是却无所适从。

如何使用Graphene定义这样的架构?


directive @unique(
  info: String = "Blah blah"
) on FIELD_DEFINITION | ENUM_VALUE

directive @ignore(
  info: String = Blah blah"
) on OBJECT

type ExampleType @ignore(info: "Blah"){
  newField: String
  oldField: String @unique(info: "Blah")
}

0 个答案:

没有答案