pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/graphql-python/flask-graphql/pull/55/files

ithub.githubassets.com/assets/primer-primitives-7f694b60439d06c0.css" /> Fixed the context option by mensinda · Pull Request #55 · graphql-python/flask-graphql · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flask_graphql/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class GraphQLView(View):
graphiql_template = None
graphiql_html_title = None
middleware = None
context = None
batch = False

methods = ['GET', 'POST', 'PUT', 'DELETE']
Expand All @@ -39,7 +40,7 @@ def get_root_value(self):
return self.root_value

def get_context(self):
return request
return self.context or request

def get_middleware(self):
return self.middleware
Expand Down
6 changes: 3 additions & 3 deletions tests/test_graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_passes_request_into_request_context(client):
}


@pytest.mark.parametrize('app', [create_app(get_context=lambda:"CUSTOM CONTEXT")])
@pytest.mark.parametrize('app', [create_app(context="CUSTOM CONTEXT")])
def test_supports_pretty_printing(client):
response = client.get(url_string(query='{context}'))

Expand Down Expand Up @@ -514,8 +514,8 @@ def test_batch_supports_post_json_query_with_json_variables(client):
# 'id': 1,
'data': {'test': "Hello Dolly"}
}]


@pytest.mark.parametrize('app', [create_app(batch=True)])
def test_batch_allows_post_with_operation_name(client):
response = client.post(
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy