Get GraphQL whole schema query

后端 未结 10 1292
花落未央
花落未央 2020-12-22 23:23

I want to get the schema from the server. I can get all entities with the types but I\'m unable to get the properties.

Getting all types:

query {
  _         


        
10条回答
  •  长情又很酷
    2020-12-23 00:03

    Refer to https://stackoverflow.com/a/42010467/10189759

    Would like to point out that if authentications are needed, that you probably cannot just use the config file generated from graphql init

    You might have to do something like this, for example, using the github graphql API

    {
      "projects": {
        "graphqlProjectTestingGraphql": {
          "schemaPath": "schema.graphql",
          "extensions": {
            "endpoints": {
              "dev": {
                "url": "https://api.github.com/graphql",
                "headers": {
                  "Authorization": "Bearer "
                }
              }
            }
          }
        }
      }
    }
    

提交回复
热议问题