1. <small id='ItO8j'></small><noframes id='ItO8j'>

    <legend id='ItO8j'><style id='ItO8j'><dir id='ItO8j'><q id='ItO8j'></q></dir></style></legend>
      <bdo id='ItO8j'></bdo><ul id='ItO8j'></ul>

      <i id='ItO8j'><tr id='ItO8j'><dt id='ItO8j'><q id='ItO8j'><span id='ItO8j'><b id='ItO8j'><form id='ItO8j'><ins id='ItO8j'></ins><ul id='ItO8j'></ul><sub id='ItO8j'></sub></form><legend id='ItO8j'></legend><bdo id='ItO8j'><pre id='ItO8j'><center id='ItO8j'></center></pre></bdo></b><th id='ItO8j'></th></span></q></dt></tr></i><div id='ItO8j'><tfoot id='ItO8j'></tfoot><dl id='ItO8j'><fieldset id='ItO8j'></fieldset></dl></div>
      <tfoot id='ItO8j'></tfoot>

      如何在GraphQL URL中查找可用操作?

      How to find available operations in GraphQL URL?(如何在GraphQL URL中查找可用操作?)
    1. <tfoot id='tOP4g'></tfoot>

      <small id='tOP4g'></small><noframes id='tOP4g'>

        <bdo id='tOP4g'></bdo><ul id='tOP4g'></ul>
            <tbody id='tOP4g'></tbody>

          1. <i id='tOP4g'><tr id='tOP4g'><dt id='tOP4g'><q id='tOP4g'><span id='tOP4g'><b id='tOP4g'><form id='tOP4g'><ins id='tOP4g'></ins><ul id='tOP4g'></ul><sub id='tOP4g'></sub></form><legend id='tOP4g'></legend><bdo id='tOP4g'><pre id='tOP4g'><center id='tOP4g'></center></pre></bdo></b><th id='tOP4g'></th></span></q></dt></tr></i><div id='tOP4g'><tfoot id='tOP4g'></tfoot><dl id='tOP4g'><fieldset id='tOP4g'></fieldset></dl></div>

              • <legend id='tOP4g'><style id='tOP4g'><dir id='tOP4g'><q id='tOP4g'></q></dir></style></legend>
                本文介绍了如何在GraphQL URL中查找可用操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                请原谅我问了这么含糊的问题。我有一个URLhttp://example.com/graphql。我想知道有哪些手术可以做。有什么办法可以查清楚吗?

                推荐答案

                GraphQL具有允许您查询其架构的introspection system。您可以构造GraphQL查询以探索其类型。

                例如,要找出所有的查询和突变根字段,您可以POST将以下JSON Body设置为http://example.com/graphql,并将内容类型设置为application/json

                {
                   "query" : "{__schema {queryType {name fields {name}}mutationType {name fields {name}}}}"
                }
                

                或使用GET并将GraphQL查询放入查询参数query

                http://example.com/graphql/?query={__schema {queryType {name fields {name}}mutationType {name fields {name}}}}
                

                这将返回如下内容:

                {
                  "data": {
                    "__schema": {
                      "queryType": {
                        "name": "Query",
                        "fields": [
                          {
                            "name": "searchFoo"
                          },
                          {
                            "name": "searchBar"
                          }
                
                        ]
                      },
                      "mutationType": {
                        "name": "Mutation",
                        "fields": [
                          {
                            "name": "createFoo"
                          },
                          {
                            "name": "updateFoo"
                          }
                        ]
                      }
                    }
                  }
                
                但更简单的方法是使用GraphQL客户端,如<[3-1]或Insomnia或.它很可能会为您提供一个交互式UI来浏览GraphQL架构,并具有一些自动完成/提示功能来帮助您构造GraphQL查询。

                这篇关于如何在GraphQL URL中查找可用操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                GUI Freezes while downloading PyQt5 and Pytube(GUI在下载PyQt5和Pytube时冻结)
                How to solve memory issues while multiprocessing using Pool.map()?(如何解决使用Pool.map()进行多处理时的内存问题?)
                Python - How to use FastAPI and uvicorn.run without blocking the thread?(Python-如何使用FastAPI和uvicorn.run而不阻塞线程?)
                How to increment a shared counter from multiple processes?(如何从多个进程递增共享计数器?)
                Using pika, how to connect to rabbitmq running in docker, started with docker-compose with external network?(使用pika,如何连接运行在docker中的rabbitmq,从docker开始-与外部网络连接?)
                How to use .rolling() on each row of a Pandas dataframe?(如何对 pandas 数据帧的每一行使用.roll()?)

                    <tbody id='bvOUx'></tbody>
                      <i id='bvOUx'><tr id='bvOUx'><dt id='bvOUx'><q id='bvOUx'><span id='bvOUx'><b id='bvOUx'><form id='bvOUx'><ins id='bvOUx'></ins><ul id='bvOUx'></ul><sub id='bvOUx'></sub></form><legend id='bvOUx'></legend><bdo id='bvOUx'><pre id='bvOUx'><center id='bvOUx'></center></pre></bdo></b><th id='bvOUx'></th></span></q></dt></tr></i><div id='bvOUx'><tfoot id='bvOUx'></tfoot><dl id='bvOUx'><fieldset id='bvOUx'></fieldset></dl></div>

                      <tfoot id='bvOUx'></tfoot>

                      1. <small id='bvOUx'></small><noframes id='bvOUx'>

                        • <bdo id='bvOUx'></bdo><ul id='bvOUx'></ul>
                          <legend id='bvOUx'><style id='bvOUx'><dir id='bvOUx'><q id='bvOUx'></q></dir></style></legend>