mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-25 02:54:06 +03:00
Allow for easier template overrides in graphiql (#863)
* don't replace <body> * Update graphene_django/templates/graphene/graphiql.html Co-Authored-By: Jonathan Kim <jkimbo@gmail.com> * Fix editor styling and initialisation Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
This commit is contained in:
parent
f3f0608606
commit
6b8c5bdefc
|
@ -97,6 +97,6 @@
|
|||
// Render <GraphiQL /> into the body.
|
||||
ReactDOM.render(
|
||||
React.createElement(GraphiQL, options),
|
||||
document.body
|
||||
document.getElementById("editor")
|
||||
);
|
||||
})();
|
||||
|
|
|
@ -10,7 +10,7 @@ add "&raw" to the end of the URL within a browser.
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
html, body {
|
||||
html, body, #editor {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
|
@ -31,6 +31,7 @@ add "&raw" to the end of the URL within a browser.
|
|||
crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="editor"></div>
|
||||
{% csrf_token %}
|
||||
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue
Block a user