Skip to content

Commit 12c3e30

Browse files
committed
Fixed issues
1 parent c1b22d7 commit 12c3e30

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

flask_graphql/graphqlview.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import json
21
from functools import partial
32

43
from flask import Response, request
54
from flask.views import View
65

76
from graphql.type.schema import GraphQLSchema
8-
from graphql_server import run_http_query, HttpQueryError, default_format_error, load_json_body, encode_execution_results, json_encode
7+
from graphql_server import (HttpQueryError, default_format_error,
8+
encode_execution_results, json_encode,
9+
load_json_body, run_http_query)
910

1011
from .render_graphiql import render_graphiql
1112

@@ -123,8 +124,7 @@ def parse_body(self):
123124
elif content_type == 'application/json':
124125
return load_json_body(request.data.decode('utf8'))
125126

126-
elif content_type == 'application/x-www-form-urlencoded' \
127-
or content_type == 'multipart/form-data':
127+
elif content_type in ('application/x-www-form-urlencoded', 'multipart/form-data'):
128128
return request.form
129129

130130
return {}

flask_graphql/render_graphiql.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from flask import render_template_string
22

3-
43
GRAPHIQL_VERSION = '0.7.1'
54

65
TEMPLATE = '''<!--

tests/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from flask import Flask
22
from flask_graphql import GraphQLView
3-
from schema import Schema
3+
from .schema import Schema
44

55

66
def create_app(path='/graphql', **kwargs):

0 commit comments

Comments
 (0)