Browse Source

Update Ariadne to 0.4, remove custom Django view (#1235)

Rafał Pitoń 6 years ago
parent
commit
bd22c402c4

+ 1 - 0
devproject/settings.py

@@ -169,6 +169,7 @@ INSTALLED_APPS = [
     "django.contrib.messages",
     "django.contrib.staticfiles",
     # 3rd party apps used by Misago
+    "ariadne.contrib.django",
     "celery",
     "debug_toolbar",
     "mptt",

+ 5 - 2
misago/graphql/admin/__init__.py

@@ -1,10 +1,13 @@
+from ariadne.contrib.django.views import GraphQLView
 from django.conf.urls import url
 
-from .views import graphql_view
+from .schema import schema
 
 
 class MisagoAdminExtension:
     def register_urlpatterns(self, urlpatterns):
         # GraphQL API
         urlpatterns.namespace(r"^graphql/", "graphql")
-        urlpatterns.patterns("graphql", url(r"^$", graphql_view, name="index"))
+        urlpatterns.patterns(
+            "graphql", url(r"^$", GraphQLView.as_view(schema=schema), name="index")
+        )

+ 0 - 75
misago/graphql/admin/tests/test_admin_graphql_view.py

@@ -1,75 +0,0 @@
-from django.test import Client
-
-from ....test import assert_contains
-
-
-def test_admin_graphql_renders_playground_on_get(admin_client, admin_graphql_link):
-    response = admin_client.get(admin_graphql_link)
-    assert response.status_code == 200
-
-
-def test_admin_graphql_server_returns_bad_request_if_post_request_was_not_json(
-    admin_client, admin_graphql_link
-):
-    response = admin_client.post(admin_graphql_link)
-    assert response.status_code == 400
-
-
-def test_admin_graphql_server_returns_bad_request_if_post_request_was_invalid_json(
-    admin_client, admin_graphql_link
-):
-    response = admin_client.post(
-        admin_graphql_link, data="invalid", content_type="application/json"
-    )
-    assert response.status_code == 400
-
-
-def test_admin_graphql_server_returns_bad_request_if_request_method_was_put(
-    admin_client, admin_graphql_link
-):
-    response = admin_client.put(admin_graphql_link)
-    assert response.status_code == 400
-
-
-def test_admin_graphql_server_returns_bad_request_if_request_method_was_patch(
-    admin_client, admin_graphql_link
-):
-    response = admin_client.patch(admin_graphql_link)
-    assert response.status_code == 400
-
-
-def test_admin_graphql_server_returns_bad_request_if_request_method_was_delete(
-    admin_client, admin_graphql_link
-):
-    response = admin_client.delete(admin_graphql_link)
-    assert response.status_code == 400
-
-
-def test_admin_graphql_server_requires_authentication_to_use_playground(
-    db, client, admin_graphql_link
-):
-    response = client.get(admin_graphql_link)
-    assert_contains(response, "Sign in")
-
-
-def test_admin_graphql_server_requires_authentication_to_run_query(
-    db, client, admin_graphql_link
-):
-    response = client.post(
-        admin_graphql_link,
-        data='{"query": "{ test }"}',
-        content_type="application/json",
-    )
-    assert_contains(response, "Sign in")
-
-
-def test_admin_graphql_server_handles_csrf_error_for_post_request_without_auth(
-    db, admin_graphql_link
-):
-    client = Client(enforce_csrf_checks=True)
-    response = client.post(
-        admin_graphql_link,
-        data='{"query": "{ test }"}',
-        content_type="application/json",
-    )
-    assert_contains(response, "Form submission rejected", status_code=403)

+ 0 - 38
misago/graphql/admin/views.py

@@ -1,38 +0,0 @@
-import json
-
-from ariadne import (
-    QueryType,
-    graphql_sync,
-    load_schema_from_path,
-    make_executable_schema,
-)
-from django.conf import settings
-from django.http import HttpResponseBadRequest, JsonResponse
-from django.shortcuts import render
-from django.views.decorators.csrf import csrf_exempt
-
-from .schema import schema
-
-
-@csrf_exempt
-def graphql_view(request):
-    if request.method == "GET":
-        return render(request, "misago/admin/graphql_playground.html")
-
-    if request.method != "POST":
-        return HttpResponseBadRequest()
-
-    if request.content_type != "application/json":
-        return HttpResponseBadRequest()
-
-    try:
-        data = json.loads(request.body)
-    except ValueError:
-        return HttpResponseBadRequest()
-
-    success, result = graphql_sync(
-        schema, data, context_value=request, debug=settings.DEBUG
-    )
-
-    status_code = 200 if success else 400
-    return JsonResponse(result, status=status_code)

+ 0 - 554
misago/graphql/templates/misago/admin/graphql_playground.html

@@ -1,554 +0,0 @@
-{% load static %}
-<!DOCTYPE html>
-
-<html>
-
-<head>
-  <meta charset=utf-8 />
-  <meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
-  <title>Misago Admin GraphQL Playground</title>
-  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/css/index.css" />
-  <link rel="apple-touch-icon" href="{% static 'apple-touch-icon.png' %}">
-  <link rel="apple-touch-icon" sizes="57x57" href="{% static 'apple-touch-icon-57.png' %}">
-  <link rel="apple-touch-icon" sizes="72x72" href="{% static 'apple-touch-icon-72.png' %}">
-  <link rel="apple-touch-icon" sizes="76x76" href="{% static 'apple-touch-icon-76.png' %}">
-  <link rel="apple-touch-icon" sizes="80x80" href="{% static 'apple-touch-icon-80.png' %}">
-  <link rel="apple-touch-icon" sizes="114x114" href="{% static 'apple-touch-icon-114.png' %}">
-  <link rel="apple-touch-icon" sizes="120x120" href="{% static 'apple-touch-icon-120.png' %}">
-  <link rel="apple-touch-icon" sizes="144x144" href="{% static 'apple-touch-icon-144.png' %}">
-  <link rel="apple-touch-icon" sizes="152x152" href="{% static 'apple-touch-icon-152.png' %}">
-  <link rel="apple-touch-icon" sizes="167x167" href="{% static 'apple-touch-icon-167.png' %}">
-  <link rel="apple-touch-icon" sizes="180x180" href="{% static 'apple-touch-icon-180.png' %}">
-  <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
-  <link rel="icon" sizes="16x16 32x32" href="{% static 'favicon.ico' %}">
-  <script src="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js"></script>
-
-</head>
-
-<body>
-  <style type="text/css">
-    html {
-      font-family: "Open Sans", sans-serif;
-      overflow: hidden;
-    }
-
-    body {
-      margin: 0;
-      background: #172a3a;
-    }
-
-    .playgroundIn {
-      -webkit-animation: playgroundIn 0.5s ease-out forwards;
-      animation: playgroundIn 0.5s ease-out forwards;
-    }
-
-    @-webkit-keyframes playgroundIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(10px);
-        -ms-transform: translateY(10px);
-        transform: translateY(10px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-
-    @keyframes playgroundIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(10px);
-        -ms-transform: translateY(10px);
-        transform: translateY(10px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-  </style>
-
-  <style type="text/css">
-    .fadeOut {
-      -webkit-animation: fadeOut 0.5s ease-out forwards;
-      animation: fadeOut 0.5s ease-out forwards;
-    }
-
-    @-webkit-keyframes fadeIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(-10px);
-        -ms-transform: translateY(-10px);
-        transform: translateY(-10px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-
-    @keyframes fadeIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(-10px);
-        -ms-transform: translateY(-10px);
-        transform: translateY(-10px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-
-    @-webkit-keyframes fadeOut {
-      from {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-      to {
-        opacity: 0;
-        -webkit-transform: translateY(-10px);
-        -ms-transform: translateY(-10px);
-        transform: translateY(-10px);
-      }
-    }
-
-    @keyframes fadeOut {
-      from {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-      to {
-        opacity: 0;
-        -webkit-transform: translateY(-10px);
-        -ms-transform: translateY(-10px);
-        transform: translateY(-10px);
-      }
-    }
-
-    @-webkit-keyframes appearIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(0px);
-        -ms-transform: translateY(0px);
-        transform: translateY(0px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-
-    @keyframes appearIn {
-      from {
-        opacity: 0;
-        -webkit-transform: translateY(0px);
-        -ms-transform: translateY(0px);
-        transform: translateY(0px);
-      }
-      to {
-        opacity: 1;
-        -webkit-transform: translateY(0);
-        -ms-transform: translateY(0);
-        transform: translateY(0);
-      }
-    }
-
-    @-webkit-keyframes scaleIn {
-      from {
-        -webkit-transform: scale(0);
-        -ms-transform: scale(0);
-        transform: scale(0);
-      }
-      to {
-        -webkit-transform: scale(1);
-        -ms-transform: scale(1);
-        transform: scale(1);
-      }
-    }
-
-    @keyframes scaleIn {
-      from {
-        -webkit-transform: scale(0);
-        -ms-transform: scale(0);
-        transform: scale(0);
-      }
-      to {
-        -webkit-transform: scale(1);
-        -ms-transform: scale(1);
-        transform: scale(1);
-      }
-    }
-
-    @-webkit-keyframes innerDrawIn {
-      0% {
-        stroke-dashoffset: 70;
-      }
-      50% {
-        stroke-dashoffset: 140;
-      }
-      100% {
-        stroke-dashoffset: 210;
-      }
-    }
-
-    @keyframes innerDrawIn {
-      0% {
-        stroke-dashoffset: 70;
-      }
-      50% {
-        stroke-dashoffset: 140;
-      }
-      100% {
-        stroke-dashoffset: 210;
-      }
-    }
-
-    @-webkit-keyframes outerDrawIn {
-      0% {
-        stroke-dashoffset: 76;
-      }
-      100% {
-        stroke-dashoffset: 152;
-      }
-    }
-
-    @keyframes outerDrawIn {
-      0% {
-        stroke-dashoffset: 76;
-      }
-      100% {
-        stroke-dashoffset: 152;
-      }
-    }
-
-    .hHWjkv {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.2222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.2222222222222222s;
-    }
-
-    .gCDOzd {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.4222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.4222222222222222s;
-    }
-
-    .hmCcxi {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.6222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.6222222222222222s;
-    }
-
-    .eHamQi {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.8222222222222223s;
-      animation: scaleIn 0.25s linear forwards 0.8222222222222223s;
-    }
-
-    .byhgGu {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 1.0222222222222221s;
-      animation: scaleIn 0.25s linear forwards 1.0222222222222221s;
-    }
-
-    .llAKP {
-      -webkit-transform-origin: 0px 0px;
-      -ms-transform-origin: 0px 0px;
-      transform-origin: 0px 0px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 1.2222222222222223s;
-      animation: scaleIn 0.25s linear forwards 1.2222222222222223s;
-    }
-
-    .bglIGM {
-      -webkit-transform-origin: 64px 28px;
-      -ms-transform-origin: 64px 28px;
-      transform-origin: 64px 28px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.2222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.2222222222222222s;
-    }
-
-    .ksxRII {
-      -webkit-transform-origin: 95.98500061035156px 46.510000228881836px;
-      -ms-transform-origin: 95.98500061035156px 46.510000228881836px;
-      transform-origin: 95.98500061035156px 46.510000228881836px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.4222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.4222222222222222s;
-    }
-
-    .cWrBmb {
-      -webkit-transform-origin: 95.97162628173828px 83.4900016784668px;
-      -ms-transform-origin: 95.97162628173828px 83.4900016784668px;
-      transform-origin: 95.97162628173828px 83.4900016784668px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.6222222222222222s;
-      animation: scaleIn 0.25s linear forwards 0.6222222222222222s;
-    }
-
-    .Wnusb {
-      -webkit-transform-origin: 64px 101.97999572753906px;
-      -ms-transform-origin: 64px 101.97999572753906px;
-      transform-origin: 64px 101.97999572753906px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 0.8222222222222223s;
-      animation: scaleIn 0.25s linear forwards 0.8222222222222223s;
-    }
-
-    .bfPqf {
-      -webkit-transform-origin: 32.03982162475586px 83.4900016784668px;
-      -ms-transform-origin: 32.03982162475586px 83.4900016784668px;
-      transform-origin: 32.03982162475586px 83.4900016784668px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 1.0222222222222221s;
-      animation: scaleIn 0.25s linear forwards 1.0222222222222221s;
-    }
-
-    .edRCTN {
-      -webkit-transform-origin: 32.033552169799805px 46.510000228881836px;
-      -ms-transform-origin: 32.033552169799805px 46.510000228881836px;
-      transform-origin: 32.033552169799805px 46.510000228881836px;
-      -webkit-transform: scale(0);
-      -ms-transform: scale(0);
-      transform: scale(0);
-      -webkit-animation: scaleIn 0.25s linear forwards 1.2222222222222223s;
-      animation: scaleIn 0.25s linear forwards 1.2222222222222223s;
-    }
-
-    .iEGVWn {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 0.3333333333333333s, appearIn 0.1s ease-out forwards 0.3333333333333333s;
-      animation: outerDrawIn 0.5s ease-out forwards 0.3333333333333333s, appearIn 0.1s ease-out forwards 0.3333333333333333s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .bsocdx {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 0.5333333333333333s, appearIn 0.1s ease-out forwards 0.5333333333333333s;
-      animation: outerDrawIn 0.5s ease-out forwards 0.5333333333333333s, appearIn 0.1s ease-out forwards 0.5333333333333333s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .jAZXmP {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 0.7333333333333334s, appearIn 0.1s ease-out forwards 0.7333333333333334s;
-      animation: outerDrawIn 0.5s ease-out forwards 0.7333333333333334s, appearIn 0.1s ease-out forwards 0.7333333333333334s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .hSeArx {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 0.9333333333333333s, appearIn 0.1s ease-out forwards 0.9333333333333333s;
-      animation: outerDrawIn 0.5s ease-out forwards 0.9333333333333333s, appearIn 0.1s ease-out forwards 0.9333333333333333s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .bVgqGk {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 1.1333333333333333s, appearIn 0.1s ease-out forwards 1.1333333333333333s;
-      animation: outerDrawIn 0.5s ease-out forwards 1.1333333333333333s, appearIn 0.1s ease-out forwards 1.1333333333333333s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .hEFqBt {
-      opacity: 0;
-      stroke-dasharray: 76;
-      -webkit-animation: outerDrawIn 0.5s ease-out forwards 1.3333333333333333s, appearIn 0.1s ease-out forwards 1.3333333333333333s;
-      animation: outerDrawIn 0.5s ease-out forwards 1.3333333333333333s, appearIn 0.1s ease-out forwards 1.3333333333333333s;
-      -webkit-animation-iteration-count: 1, 1;
-      animation-iteration-count: 1, 1;
-    }
-
-    .dzEKCM {
-      opacity: 0;
-      stroke-dasharray: 70;
-      -webkit-animation: innerDrawIn 1s ease-in-out forwards 1.3666666666666667s, appearIn 0.1s linear forwards 1.3666666666666667s;
-      animation: innerDrawIn 1s ease-in-out forwards 1.3666666666666667s, appearIn 0.1s linear forwards 1.3666666666666667s;
-      -webkit-animation-iteration-count: infinite, 1;
-      animation-iteration-count: infinite, 1;
-    }
-
-    .DYnPx {
-      opacity: 0;
-      stroke-dasharray: 70;
-      -webkit-animation: innerDrawIn 1s ease-in-out forwards 1.5333333333333332s, appearIn 0.1s linear forwards 1.5333333333333332s;
-      animation: innerDrawIn 1s ease-in-out forwards 1.5333333333333332s, appearIn 0.1s linear forwards 1.5333333333333332s;
-      -webkit-animation-iteration-count: infinite, 1;
-      animation-iteration-count: infinite, 1;
-    }
-
-    .hjPEAQ {
-      opacity: 0;
-      stroke-dasharray: 70;
-      -webkit-animation: innerDrawIn 1s ease-in-out forwards 1.7000000000000002s, appearIn 0.1s linear forwards 1.7000000000000002s;
-      animation: innerDrawIn 1s ease-in-out forwards 1.7000000000000002s, appearIn 0.1s linear forwards 1.7000000000000002s;
-      -webkit-animation-iteration-count: infinite, 1;
-      animation-iteration-count: infinite, 1;
-    }
-
-    #loading-wrapper {
-      position: absolute;
-      width: 100vw;
-      height: 100vh;
-      display: -webkit-box;
-      display: -webkit-flex;
-      display: -ms-flexbox;
-      display: flex;
-      -webkit-align-items: center;
-      -webkit-box-align: center;
-      -ms-flex-align: center;
-      align-items: center;
-      -webkit-box-pack: center;
-      -webkit-justify-content: center;
-      -ms-flex-pack: center;
-      justify-content: center;
-      -webkit-flex-direction: column;
-      -ms-flex-direction: column;
-      flex-direction: column;
-    }
-
-    .logo {
-      width: 75px;
-      height: 75px;
-      margin-bottom: 20px;
-      opacity: 0;
-      -webkit-animation: fadeIn 0.5s ease-out forwards;
-      animation: fadeIn 0.5s ease-out forwards;
-    }
-
-    .text {
-      font-size: 32px;
-      font-weight: 200;
-      text-align: center;
-      color: rgba(255, 255, 255, 0.6);
-      opacity: 0;
-      -webkit-animation: fadeIn 0.5s ease-out forwards;
-      animation: fadeIn 0.5s ease-out forwards;
-    }
-
-    .dGfHfc {
-      font-weight: 400;
-    }
-  </style>
-  <div id="loading-wrapper">
-    <svg class="logo" viewBox="0 0 128 128" xmlns:xlink="http://www.w3.org/1999/xlink">
-      <title>GraphQL Playground Logo</title>
-      <defs>
-        <linearGradient id="linearGradient-1" x1="4.86%" x2="96.21%" y1="0%" y2="99.66%">
-          <stop stop-color="#E00082" stop-opacity=".8" offset="0%"></stop>
-          <stop stop-color="#E00082" offset="100%"></stop>
-        </linearGradient>
-      </defs>
-      <g>
-        <rect id="Gradient" width="127.96" height="127.96" y="1" fill="url(#linearGradient-1)" rx="4"></rect>
-        <path id="Border" fill="#E00082" fill-rule="nonzero" d="M4.7 2.84c-1.58 0-2.86 1.28-2.86 2.85v116.57c0 1.57 1.28 2.84 2.85 2.84h116.57c1.57 0 2.84-1.26 2.84-2.83V5.67c0-1.55-1.26-2.83-2.83-2.83H4.67zM4.7 0h116.58c3.14 0 5.68 2.55 5.68 5.7v116.58c0 3.14-2.54 5.68-5.68 5.68H4.68c-3.13 0-5.68-2.54-5.68-5.68V5.68C-1 2.56 1.55 0 4.7 0z"></path>
-        <path class="bglIGM" x="64" y="28" fill="#fff" d="M64 36c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" style="transform: translate(100px, 100px);"></path>
-        <path class="ksxRII" x="95.98500061035156" y="46.510000228881836" fill="#fff" d="M89.04 50.52c-2.2-3.84-.9-8.73 2.94-10.96 3.83-2.2 8.72-.9 10.95 2.94 2.2 3.84.9 8.73-2.94 10.96-3.85 2.2-8.76.9-10.97-2.94"
-          style="transform: translate(100px, 100px);"></path>
-        <path class="cWrBmb" x="95.97162628173828" y="83.4900016784668" fill="#fff" d="M102.9 87.5c-2.2 3.84-7.1 5.15-10.94 2.94-3.84-2.2-5.14-7.12-2.94-10.96 2.2-3.84 7.12-5.15 10.95-2.94 3.86 2.23 5.16 7.12 2.94 10.96"
-          style="transform: translate(100px, 100px);"></path>
-        <path class="Wnusb" x="64" y="101.97999572753906" fill="#fff" d="M64 110c-4.43 0-8-3.6-8-8.02 0-4.44 3.57-8.02 8-8.02s8 3.58 8 8.02c0 4.4-3.57 8.02-8 8.02"
-          style="transform: translate(100px, 100px);"></path>
-        <path class="bfPqf" x="32.03982162475586" y="83.4900016784668" fill="#fff" d="M25.1 87.5c-2.2-3.84-.9-8.73 2.93-10.96 3.83-2.2 8.72-.9 10.95 2.94 2.2 3.84.9 8.73-2.94 10.96-3.85 2.2-8.74.9-10.95-2.94"
-          style="transform: translate(100px, 100px);"></path>
-        <path class="edRCTN" x="32.033552169799805" y="46.510000228881836" fill="#fff" d="M38.96 50.52c-2.2 3.84-7.12 5.15-10.95 2.94-3.82-2.2-5.12-7.12-2.92-10.96 2.2-3.84 7.12-5.15 10.95-2.94 3.83 2.23 5.14 7.12 2.94 10.96"
-          style="transform: translate(100px, 100px);"></path>
-        <path class="iEGVWn" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M63.55 27.5l32.9 19-32.9-19z"></path>
-        <path class="bsocdx" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M96 46v38-38z"></path>
-        <path class="jAZXmP" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M96.45 84.5l-32.9 19 32.9-19z"></path>
-        <path class="hSeArx" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M64.45 103.5l-32.9-19 32.9 19z"></path>
-        <path class="bVgqGk" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M32 84V46v38z"></path>
-        <path class="hEFqBt" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M31.55 46.5l32.9-19-32.9 19z"></path>
-        <path class="dzEKCM" id="Triangle-Bottom" stroke="#fff" stroke-width="4" d="M30 84h70" stroke-linecap="round"></path>
-        <path class="DYnPx" id="Triangle-Left" stroke="#fff" stroke-width="4" d="M65 26L30 87" stroke-linecap="round"></path>
-        <path class="hjPEAQ" id="Triangle-Right" stroke="#fff" stroke-width="4" d="M98 87L63 26" stroke-linecap="round"></path>
-      </g>
-    </svg>
-    <div class="text">Loading
-      <span class="dGfHfc">GraphQL Playground</span>
-    </div>
-  </div>
-
-  <div id="root" />
-  <script type="text/javascript">
-    window.addEventListener('load', function (event) {
-
-      const loadingWrapper = document.getElementById('loading-wrapper');
-      loadingWrapper.classList.add('fadeOut');
-
-
-      const root = document.getElementById('root');
-      root.classList.add('playgroundIn');
-
-      GraphQLPlayground.init(root, {
-        'request.credentials': 'same-origin',
-        'schema.polling.interval': 5000
-      })
-    })
-  </script>
-</body>
-</html>

+ 1 - 1
requirements.in

@@ -1,4 +1,4 @@
-ariadne>0.2
+ariadne>0.3
 beautifulsoup4<4.8
 bleach<3.2
 celery[redis]

+ 5 - 6
requirements.txt

@@ -5,7 +5,7 @@
 #    pip-compile --output-file=requirements.txt requirements.in
 #
 amqp==2.4.2               # via kombu
-ariadne==0.3.0
+ariadne==0.4.0
 atomicwrites==1.3.0       # via pytest
 attrs==19.1.0             # via pytest
 beautifulsoup4==4.7.1
@@ -22,7 +22,7 @@ django-mptt==0.10.0
 django==2.2.1
 djangorestframework==3.9.4
 faker==1.0.7
-graphql-core-next==1.0.3  # via ariadne
+graphql-core-next==1.0.4  # via ariadne
 html5lib==1.0.1
 idna==2.8                 # via requests
 kombu==4.5.0              # via celery
@@ -42,7 +42,7 @@ python3-openid==3.1.0     # via social-auth-core
 pytz==2019.1
 redis==3.2.1              # via celery
 requests-oauthlib==1.2.0  # via social-auth-core
-requests==2.21.0
+requests==2.22.0
 responses==0.10.6
 six==1.12.0               # via bleach, faker, html5lib, pytest, python-dateutil, responses, snapshottest, social-auth-app-django, social-auth-core
 snapshottest==0.5.0
@@ -50,13 +50,12 @@ social-auth-app-django==3.1.0
 social-auth-core==3.1.0   # via social-auth-app-django
 soupsieve==1.9.1          # via beautifulsoup4
 sqlparse==0.3.0           # via django, django-debug-toolbar
-starlette==0.11.4         # via ariadne
+starlette==0.12.0         # via ariadne
 termcolor==1.1.0          # via snapshottest
 text-unidecode==1.2       # via faker
 typing-extensions==3.7.2  # via ariadne
-typing==3.6.6             # via ariadne
 unidecode==1.0.23
-urllib3==1.24.3           # via requests
+urllib3==1.25.2           # via requests
 vine==1.3.0               # via amqp, celery
 wcwidth==0.1.7            # via pytest
 webencodings==0.5.1       # via bleach, html5lib