【问题标题】:Query GraphQL Mutation Schema查询 GraphQL Mutation Schema
【发布时间】:2016-05-06 08:23:39
【问题描述】:

有没有办法使用 HTTP 查询 graphql 服务器的突变模式?或者一种查询graphql服务器整个模式的方法?谢谢!

【问题讨论】:

    标签: graphql


    【解决方案1】:

    当然是。官方 GraphQL 规范概述 the introspection specifics。获取可用突变的示例可能如下所示...

    {
      __schema {
        mutationType {
          fields {
            name
          }
        }
      }
    }
    

    【讨论】:

    • 谢谢!超级有帮助。我还发现 graphiql 插件作为一种 GUI 方式来探索 graphql 端点非常有用:github.com/graphql/graphiql
    猜你喜欢
    • 2016-03-03
    • 2020-08-18
    • 2021-11-10
    • 2020-02-06
    • 2019-06-12
    • 2021-03-05
    • 2018-10-20
    • 2018-09-07
    • 2020-01-31
    相关资源
    最近更新 更多