|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 | from django.views.decorators.csrf import csrf_exempt
|
3 | 3 | from graphene_django.views import GraphQLView
|
4 |
| -from graphql.execution.executor import execute, subscribe |
| 4 | +# from graphql.execution.executor import execute, subscribe |
5 | 5 | from rest_framework.decorators import (
|
6 | 6 | authentication_classes, permission_classes, api_view, throttle_classes)
|
7 | 7 | from rest_framework.permissions import IsAuthenticated
|
8 | 8 | from rest_framework.request import Request
|
9 | 9 | from rest_framework.settings import api_settings
|
10 | 10 | from rest_framework.views import APIView
|
11 |
| -from graphql.utils.get_operation_ast import get_operation_ast |
| 11 | +# from graphql.utils.get_operation_ast import get_operation_ast |
12 | 12 |
|
13 | 13 | from .settings import graphql_api_settings
|
14 | 14 | from .utils import clean_dict
|
15 | 15 |
|
16 | 16 |
|
17 | 17 | class ExtraGraphQLView(GraphQLView, APIView):
|
18 |
| - |
| 18 | + """ |
19 | 19 | def execute(self, *args, **kwargs):
|
20 | 20 | operation_ast = get_operation_ast(args[0])
|
21 | 21 |
|
22 | 22 | if operation_ast and operation_ast.operation == 'subscription':
|
23 | 23 | return subscribe(self.schema, *args, **kwargs)
|
24 | 24 |
|
25 | 25 | return execute(self.schema, *args, **kwargs)
|
| 26 | + """ |
26 | 27 |
|
27 | 28 | @classmethod
|
28 | 29 | def as_view(cls, *args, **kwargs):
|
|
0 commit comments