Skip to content

Commit 68ff98d

Browse files
committed
Fix webob graphiql check
Was working by accident before
1 parent 6623379 commit 68ff98d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graphql_server/webob/graphqlview.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
class GraphQLView:
2929
schema = None
30-
request = None
3130
root_value = None
3231
context = None
3332
pretty = False
@@ -187,8 +186,9 @@ def should_display_graphiql(self, request):
187186
if not self.graphiql or "raw" in request.params:
188187
return False
189188

190-
return self.request_wants_html()
189+
return self.request_wants_html(request)
191190

192-
def request_wants_html(self):
193-
best = self.request.accept.best_match(["application/json", "text/html"])
191+
@staticmethod
192+
def request_wants_html(request):
193+
best = request.accept.best_match(["application/json", "text/html"])
194194
return best == "text/html"

0 commit comments

Comments
 (0)