Graphql query returns Github schema definition instead of error or response.

I’m trying to get this query working as a place to start learning filtering.  However, instead of an error or the expected response, I get the actual github schema definition, e.g.:

"data": {
        "__schema": {
            "queryType": {
                "name": "Query"
            },
            "mutationType": {
                "name": "Mutation"
            },
            "subscriptionType": null,
            "types": [
                {
                    "kind": "SCALAR",
                    "name": "Boolean",
                    "description": "Represents `true` or `false` values.",
                    "fields": null,
                    "inputFields": null,
                    "interfaces": null,
                    "enumValues": null,
                    "possibleTypes": null
                },

I had this behavior once before with a different query and it turned out to be my error, but without much more information I’m not sure how to proceed.   Any ideas?

1 Like

@andreagriffiths11  do you have any tips for me to debug this?   I’ve tried modifying the  query but always just get the schema def instead of an error or result.

Thanks!

Larry

Hey @lmatter,

Thanks for the ping, are you logged in to the explorer? I’m able to execute your query as is, here is my output:

{
  "data": {
    "search": {
      "repositoryCount": 18,
      "edges": [
        {
          "node": {
            "name": "graphql",
            "url": "https://github.com/graphql-go/graphql",
            "description": "An implementation of GraphQL for Go / Golang",
            "createdAt": "2015-07-19T12:25:43Z",
            "pushedAt": "2019-10-21T14:29:01Z",
            "updatedAt": "2019-10-22T11:22:17Z",
            "releases": {
              "releases": 11
            },
            "forks": 488,
            "pullRequests": {
              "pullRequests": 271
            },
            "stargazers": {
              "stars": 5555
            },
            "totalIssues": {
              "totalIssues": 249
            },
            "openIssues": {
              "openIssues": 110
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "graphql-go"
                  }
                },
                {
                  "topic": {
                    "name": "subscriptions"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "gqlgen",
            "url": "https://github.com/99designs/gqlgen",
            "description": "go generate based graphql server library",
            "createdAt": "2018-02-11T04:54:11Z",
            "pushedAt": "2019-10-20T08:02:13Z",
            "updatedAt": "2019-10-22T10:34:58Z",
            "releases": {
              "releases": 28
            },
            "forks": 322,
            "pullRequests": {
              "pullRequests": 404
            },
            "stargazers": {
              "stars": 3465
            },
            "totalIssues": {
              "totalIssues": 503
            },
            "openIssues": {
              "openIssues": 52
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "JavaScript"
                },
                {
                  "name": "HTML"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "subscriptions"
                  }
                },
                {
                  "topic": {
                    "name": "schema-first"
                  }
                },
                {
                  "topic": {
                    "name": "codegen"
                  }
                },
                {
                  "topic": {
                    "name": "gogenerate"
                  }
                },
                {
                  "topic": {
                    "name": "golang"
                  }
                },
                {
                  "topic": {
                    "name": "dataloader"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "go-graphql-starter",
            "url": "https://github.com/OscarYuen/go-graphql-starter",
            "description": "This repository uses graph-gophers/graphql-go to build a starter web application",
            "createdAt": "2017-12-13T10:22:40Z",
            "pushedAt": "2018-12-29T18:20:53Z",
            "updatedAt": "2019-10-14T13:01:49Z",
            "releases": {
              "releases": 0
            },
            "forks": 46,
            "pullRequests": {
              "pullRequests": 14
            },
            "stargazers": {
              "stars": 177
            },
            "totalIssues": {
              "totalIssues": 8
            },
            "openIssues": {
              "openIssues": 3
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "HTML"
                },
                {
                  "name": "Dockerfile"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "go"
                  }
                },
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "sqlx"
                  }
                },
                {
                  "topic": {
                    "name": "starter"
                  }
                },
                {
                  "topic": {
                    "name": "golang"
                  }
                },
                {
                  "topic": {
                    "name": "backend"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "thunder",
            "url": "https://github.com/samsarahq/thunder",
            "description": "⚡️ A Go framework for rapidly building powerful graphql services",
            "createdAt": "2016-10-26T21:54:28Z",
            "pushedAt": "2019-10-21T19:44:05Z",
            "updatedAt": "2019-10-22T10:26:12Z",
            "releases": {
              "releases": 0
            },
            "forks": 65,
            "pullRequests": {
              "pullRequests": 273
            },
            "stargazers": {
              "stars": 887
            },
            "totalIssues": {
              "totalIssues": 57
            },
            "openIssues": {
              "openIssues": 36
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "HTML"
                },
                {
                  "name": "JavaScript"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "go"
                  }
                },
                {
                  "topic": {
                    "name": "realtime"
                  }
                },
                {
                  "topic": {
                    "name": "thunder"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "daptin",
            "url": "https://github.com/daptin/daptin",
            "description": "Daptin - GraphQL/JSON-API Headless CMS",
            "createdAt": "2017-05-30T12:16:00Z",
            "pushedAt": "2019-10-15T09:23:15Z",
            "updatedAt": "2019-10-19T09:39:31Z",
            "releases": {
              "releases": 16
            },
            "forks": 28,
            "pullRequests": {
              "pullRequests": 17
            },
            "stargazers": {
              "stars": 390
            },
            "totalIssues": {
              "totalIssues": 39
            },
            "openIssues": {
              "openIssues": 10
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "JavaScript"
                },
                {
                  "name": "HTML"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "content-management"
                  }
                },
                {
                  "topic": {
                    "name": "backend"
                  }
                },
                {
                  "topic": {
                    "name": "headless-cms"
                  }
                },
                {
                  "topic": {
                    "name": "cloud"
                  }
                },
                {
                  "topic": {
                    "name": "static-site"
                  }
                },
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "json"
                  }
                },
                {
                  "topic": {
                    "name": "crud-api"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "sqoop",
            "url": "https://github.com/solo-io/sqoop",
            "description": "The GraphQL Engine powered by Gloo",
            "createdAt": "2018-05-25T15:12:02Z",
            "pushedAt": "2019-06-30T15:48:02Z",
            "updatedAt": "2019-10-21T04:01:27Z",
            "releases": {
              "releases": 10
            },
            "forks": 24,
            "pullRequests": {
              "pullRequests": 22
            },
            "stargazers": {
              "stars": 435
            },
            "totalIssues": {
              "totalIssues": 21
            },
            "openIssues": {
              "openIssues": 12
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "Makefile"
                },
                {
                  "name": "Shell"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": []
            }
          }
        },
        {
          "node": {
            "name": "weaviate",
            "url": "https://github.com/semi-technologies/weaviate",
            "description": "Open Source Knowledge Graph (GraphQL/RESTful/P2P)",
            "createdAt": "2016-03-30T15:03:17Z",
            "pushedAt": "2019-10-11T14:17:30Z",
            "updatedAt": "2019-10-17T20:24:05Z",
            "releases": {
              "releases": 30
            },
            "forks": 25,
            "pullRequests": {
              "pullRequests": 179
            },
            "stargazers": {
              "stars": 167
            },
            "totalIssues": {
              "totalIssues": 835
            },
            "openIssues": {
              "openIssues": 83
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "Shell"
                },
                {
                  "name": "Dockerfile"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "decentralized"
                  }
                },
                {
                  "topic": {
                    "name": "knowledge-graph"
                  }
                },
                {
                  "topic": {
                    "name": "semantics"
                  }
                },
                {
                  "topic": {
                    "name": "restfull-api"
                  }
                },
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "weaviate"
                  }
                },
                {
                  "topic": {
                    "name": "janusgraph"
                  }
                },
                {
                  "topic": {
                    "name": "contextual"
                  }
                },
                {
                  "topic": {
                    "name": "contextual-search"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "micro-starter-kit",
            "url": "https://github.com/xmlking/micro-starter-kit",
            "description": "Cloud Native GoLang Microservices - gRPC, GraphQL",
            "createdAt": "2019-06-10T06:33:50Z",
            "pushedAt": "2019-10-22T11:46:00Z",
            "updatedAt": "2019-10-21T12:21:24Z",
            "releases": {
              "releases": 9
            },
            "forks": 11,
            "pullRequests": {
              "pullRequests": 37
            },
            "stargazers": {
              "stars": 53
            },
            "totalIssues": {
              "totalIssues": 1
            },
            "openIssues": {
              "openIssues": 1
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Go"
                },
                {
                  "name": "Makefile"
                },
                {
                  "name": "Shell"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "golang"
                  }
                },
                {
                  "topic": {
                    "name": "go-micro"
                  }
                },
                {
                  "topic": {
                    "name": "micro"
                  }
                },
                {
                  "topic": {
                    "name": "monorepo"
                  }
                },
                {
                  "topic": {
                    "name": "microservices"
                  }
                },
                {
                  "topic": {
                    "name": "kubernetes"
                  }
                },
                {
                  "topic": {
                    "name": "gateway"
                  }
                },
                {
                  "topic": {
                    "name": "grpc"
                  }
                },
                {
                  "topic": {
                    "name": "cicd"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "name": "graphql-go-tools",
            "url": "https://github.com/jensneuse/graphql-go-tools",
            "description": "graphql golang go parser lexer linter proxy",
            "createdAt": "2018-11-10T10:46:56Z",
            "pushedAt": "2019-10-16T17:19:17Z",
            "updatedAt": "2019-10-21T03:42:24Z",
            "releases": {
              "releases": 14
            },
            "forks": 5,
            "pullRequests": {
              "pullRequests": 55
            },
            "stargazers": {
              "stars": 34
            },
            "totalIssues": {
              "totalIssues": 36
            },
            "openIssues": {
              "openIssues": 8
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Makefile"
                },
                {
                  "name": "Go"
                },
                {
                  "name": "JavaScript"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": []
            }
          }
        },
        {
          "node": {
            "name": "super-graph",
            "url": "https://github.com/dosco/super-graph",
            "description": "Super Graph - An instant GraphQL API for Rails / Postgres app. No code needed.",
            "createdAt": "2019-03-24T13:43:05Z",
            "pushedAt": "2019-10-15T06:30:43Z",
            "updatedAt": "2019-10-15T17:27:58Z",
            "releases": {
              "releases": 4
            },
            "forks": 8,
            "pullRequests": {
              "pullRequests": 5
            },
            "stargazers": {
              "stars": 302
            },
            "totalIssues": {
              "totalIssues": 5
            },
            "openIssues": {
              "openIssues": 1
            },
            "primaryLanguage": {
              "primaryLanguage": "Go"
            },
            "languages": {
              "nodes": [
                {
                  "name": "Dockerfile"
                },
                {
                  "name": "JavaScript"
                },
                {
                  "name": "CSS"
                }
              ]
            },
            "repositoryTopics": {
              "nodes": [
                {
                  "topic": {
                    "name": "graphql"
                  }
                },
                {
                  "topic": {
                    "name": "graphql-server"
                  }
                },
                {
                  "topic": {
                    "name": "rails"
                  }
                },
                {
                  "topic": {
                    "name": "ruby-on-rails"
                  }
                },
                {
                  "topic": {
                    "name": "postgresql"
                  }
                },
                {
                  "topic": {
                    "name": "golang"
                  }
                },
                {
                  "topic": {
                    "name": "automatic-api"
                  }
                },
                {
                  "topic": {
                    "name": "sql"
                  }
                },
                {
                  "topic": {
                    "name": "cloud-native"
                  }
                }
              ]
            }
          }
        }
      ]
    }
  }
}

I was using Postman.  However, it’s now working.  All it took was for you to have eyes on it :slight_smile:

Thanks,

Larry

1 Like

@lmatter wrote:

I was using Postman.  However, it’s now working.  All it took was for you to have eyes on it :slight_smile:

Thanks,

Larry

Hi I am a beginner in graphql. I am also getting the schema instead of response. I am using Postman to send graphql query. what is the solution for this. Sorry i didn’t understand the above solution. where should i log in?

Please help me.

thanks in advance

The "data": {"__schema": {… response happens with the GET method. The fix is to use the POST method when sending the query.