From 6b8c5bdefc20dca773f8321774a94e627b5abca5 Mon Sep 17 00:00:00 2001 From: Ben Howes Date: Fri, 7 Feb 2020 10:16:11 +0000 Subject: [PATCH] Allow for easier template overrides in graphiql (#863) * don't replace * Update graphene_django/templates/graphene/graphiql.html Co-Authored-By: Jonathan Kim * Fix editor styling and initialisation Co-authored-by: Jonathan Kim --- graphene_django/static/graphene_django/graphiql.js | 2 +- graphene_django/templates/graphene/graphiql.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene_django/static/graphene_django/graphiql.js b/graphene_django/static/graphene_django/graphiql.js index e38cd62..c939216 100644 --- a/graphene_django/static/graphene_django/graphiql.js +++ b/graphene_django/static/graphene_django/graphiql.js @@ -97,6 +97,6 @@ // Render into the body. ReactDOM.render( React.createElement(GraphiQL, options), - document.body + document.getElementById("editor") ); })(); diff --git a/graphene_django/templates/graphene/graphiql.html b/graphene_django/templates/graphene/graphiql.html index a0d0e1a..d0546bd 100644 --- a/graphene_django/templates/graphene/graphiql.html +++ b/graphene_django/templates/graphene/graphiql.html @@ -10,7 +10,7 @@ add "&raw" to the end of the URL within a browser.