slance
slance

Reputation: 31

How to allow GraphQL introspection on magento graphql

Running

   {
  __schema{
    types{
     name
      kind
    }
  }
}

gives

{
  "errors": [
    {
      "message": "GraphQL introspection is not allowed, but the query contained __schema or __type",
      "category": "graphql",
      "locations": [
        {
          "line": 31,
          "column": 3
        }
      ]
    }
  ]
}

I am using GraphiQL on windows to a Magento graphql server. I also get the same result if i run graphql get-schema on command line using graphql-cli. How do I allow Graphql introspection?

Upvotes: 1

Views: 2164

Answers (1)

mkotov
mkotov

Reputation: 121

You need to be in Developer mode to use introspection.

Use deploy:mode:set developer

Upvotes: 2

Related Questions