Skip to content

Commit

Permalink
Fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 20, 2017
1 parent c1b22d7 commit 12c3e30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions flask_graphql/graphqlview.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import json
from functools import partial

from flask import Response, request
from flask.views import View

from graphql.type.schema import GraphQLSchema
from graphql_server import run_http_query, HttpQueryError, default_format_error, load_json_body, encode_execution_results, json_encode
from graphql_server import (HttpQueryError, default_format_error,
encode_execution_results, json_encode,
load_json_body, run_http_query)

from .render_graphiql import render_graphiql

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

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

return {}
Expand Down
1 change: 0 additions & 1 deletion flask_graphql/render_graphiql.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from flask import render_template_string


GRAPHIQL_VERSION = '0.7.1'

TEMPLATE = '''<!--
Expand Down
2 changes: 1 addition & 1 deletion tests/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask import Flask
from flask_graphql import GraphQLView
from schema import Schema
from .schema import Schema


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

0 comments on commit 12c3e30

Please sign in to comment.