From 168a1a81a6ed1ed6bf06627e4511e2b62e624045 Mon Sep 17 00:00:00 2001 From: Eugene Mironov Date: Fri, 25 May 2018 23:57:05 +0500 Subject: [PATCH] Add introspection query --- js/chromeiql.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/chromeiql.jsx b/js/chromeiql.jsx index a4de511..6d4f07b 100644 --- a/js/chromeiql.jsx +++ b/js/chromeiql.jsx @@ -52,6 +52,10 @@ function updateURL() { // Defines a GraphQL fetcher using the fetch API. function graphQLFetcher(endpoint) { return function(graphQLParams) { + if (graphQLParams.query.indexOf('query IntrospectionQuery') > -1) { + graphQLParams.operationName = 'IntrospectionQuery' + } + return fetch(endpoint, { method: 'post', headers: { 'Content-Type': 'application/json' },