We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6623379 commit 68ff98dCopy full SHA for 68ff98d
graphql_server/webob/graphqlview.py
@@ -27,7 +27,6 @@
27
28
class GraphQLView:
29
schema = None
30
- request = None
31
root_value = None
32
context = None
33
pretty = False
@@ -187,8 +186,9 @@ def should_display_graphiql(self, request):
187
186
if not self.graphiql or "raw" in request.params:
188
return False
189
190
- return self.request_wants_html()
+ return self.request_wants_html(request)
191
192
- def request_wants_html(self):
193
- best = self.request.accept.best_match(["application/json", "text/html"])
+ @staticmethod
+ def request_wants_html(request):
+ best = request.accept.best_match(["application/json", "text/html"])
194
return best == "text/html"
0 commit comments