mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 17:47:12 +03:00
057b491176
* Add integrity checks for GraphiQL CDN resources Also fixes an erroneous assignment preventing a setting from getting to the UI. * Pass SRIs and new versions to the template * Update hashes * Use SRI-stable artifacts for GraphiQL resources
53 lines
1.9 KiB
HTML
53 lines
1.9 KiB
HTML
<!--
|
|
The request to this GraphQL server provided the header "Accept: text/html"
|
|
and as a result has been presented GraphiQL - an in-browser IDE for
|
|
exploring GraphQL.
|
|
If you wish to receive JSON, provide the header "Accept: application/json" or
|
|
add "&raw" to the end of the URL within a browser.
|
|
-->
|
|
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
html, body, #editor {
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<link href="https://cdn.jsdelivr.net/npm/graphiql@{{graphiql_version}}/graphiql.min.css"
|
|
integrity="{{graphiql_css_sri}}"
|
|
rel="stylesheet"
|
|
crossorigin="anonymous" />
|
|
<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@{{whatwg_fetch_version}}/dist/fetch.umd.js"
|
|
integrity="{{whatwg_fetch_sri}}"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/react@{{react_version}}/umd/react.production.min.js"
|
|
integrity="{{react_sri}}"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/react-dom@{{react_version}}/umd/react-dom.production.min.js"
|
|
integrity="{{react_dom_sri}}"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/graphiql@{{graphiql_version}}/graphiql.min.js"
|
|
integrity="{{graphiql_sri}}"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/subscriptions-transport-ws@{{subscriptions_transport_ws_version}}/browser/client.js"
|
|
integrity="{{subscriptions_transport_ws_sri}}"
|
|
crossorigin="anonymous"></script>
|
|
</head>
|
|
<body>
|
|
<div id="editor"></div>
|
|
{% csrf_token %}
|
|
<script type="application/javascript">
|
|
window.GRAPHENE_SETTINGS = {
|
|
{% if subscription_path %}
|
|
subscriptionPath: "{{subscription_path}}",
|
|
{% endif %}
|
|
};
|
|
</script>
|
|
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
|
|
</body>
|
|
</html>
|