-
Notifications
You must be signed in to change notification settings - Fork 70
Update dependencies #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
72a9eea
7b45e70
d184cdc
8bacf9a
ee5b077
80d3f7c
271b447
aac23bc
6623379
68ff98d
d1d8835
2b58b9a
fa48065
3673f76
ff2d087
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"""Based on (express-graphql)[https://github.com/graphql/express-graphql/blob/master/src/renderGraphiQL.js] and | ||
"""Based on (express-graphql)[https://github.com/graphql/express-graphql/blob/main/src/renderGraphiQL.ts] and | ||
(subscriptions-transport-ws)[https://github.com/apollographql/subscriptions-transport-ws]""" | ||
import json | ||
import re | ||
|
@@ -7,7 +7,7 @@ | |
from jinja2 import Environment | ||
from typing_extensions import TypedDict | ||
|
||
GRAPHIQL_VERSION = "1.0.3" | ||
GRAPHIQL_VERSION = "1.4.7" | ||
|
||
GRAPHIQL_TEMPLATE = """<!-- | ||
The request to this GraphQL server provided the header "Accept: text/html" | ||
|
@@ -34,12 +34,12 @@ | |
} | ||
</style> | ||
<link href="//cdn.jsdelivr.net/npm/graphiql@{{graphiql_version}}/graphiql.css" rel="stylesheet" /> | ||
<script src="//cdn.jsdelivr.net/npm/promise-polyfill@8.1.3/dist/polyfill.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/unfetch@4.1.0/dist/unfetch.umd.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/react@16.13.1/umd/react.production.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/react-dom@16.13.1/umd/react-dom.production.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/promise-polyfill@8.2.0/dist/polyfill.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/unfetch@4.2.0/dist/unfetch.umd.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/react@16.14.0/umd/react.production.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/react-dom@16.14.0/umd/react-dom.production.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/graphiql@{{graphiql_version}}/graphiql.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/[email protected].16/browser/client.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/[email protected].18/browser/client.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/[email protected]/browser/client.js"></script> | ||
</head> | ||
<body> | ||
|
@@ -308,9 +308,8 @@ async def render_graphiql_async( | |
jinja_env: Optional[Environment] = config.get("jinja_env") | ||
|
||
if jinja_env: | ||
# This method returns a Template. See https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.Template | ||
template = jinja_env.from_string(graphiql_template) | ||
if jinja_env.is_async: # type: ignore | ||
if jinja_env.is_async: | ||
source = await template.render_async(**template_vars) | ||
else: | ||
source = template.render(**template_vars) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
from re import search | ||
from setuptools import setup, find_packages | ||
|
||
install_requires = ["graphql-core>=3.2,<3.3", "typing-extensions>=4,<5"] | ||
install_requires = [ | ||
"graphql-core>=3.2,<3.3", | ||
"Jinja2>=3.1,<4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is jinja now a required dependency? AFAIK it's only used for GraphiQL, which users can disable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup you're right. Just moved it back to test dependencies. |
||
"typing-extensions>=4,<5", | ||
] | ||
|
||
tests_requires = [ | ||
"pytest>=6.2,<6.3", | ||
"pytest-asyncio>=0.16,<1", | ||
"pytest-cov>=3,<4", | ||
"aiohttp>=3.8,<4", | ||
"Jinja2>=2.11,<3", | ||
"pytest>=7.2,<8", | ||
"pytest-asyncio>=0.20,<1", | ||
"pytest-cov>=4,<5", | ||
"sanic-testing>=22.3,<23", | ||
] | ||
|
||
dev_requires = [ | ||
"flake8>=4,<5", | ||
"flake8>=5,<6", | ||
"isort>=5,<6", | ||
"black>=19.10b0", | ||
"mypy>=0.931,<1", | ||
"black>=22.12,<22.13", | ||
"mypy>=0.991,<1", | ||
"check-manifest>=0.47,<1", | ||
] + tests_requires | ||
|
||
install_flask_requires = [ | ||
"flask>=1,<2", | ||
"flask>=1,<3", | ||
] | ||
|
||
install_sanic_requires = [ | ||
"sanic>=20.3,<21", | ||
"sanic>=21.12,<23", | ||
] | ||
|
||
install_webob_requires = [ | ||
|
@@ -35,7 +38,7 @@ | |
"aiohttp>=3.8,<4", | ||
] | ||
|
||
install_quart_requires = ["quart>=0.6.15,<0.15"] | ||
install_quart_requires = ["quart>=0.15,<1"] | ||
|
||
install_all_requires = ( | ||
install_requires | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from quart.typing import TestClientProtocol | ||
|
||
TestClientProtocol.__test__ = False # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not update to
2.2.0
straight away?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely should upgrade to 2.2.0. I was basing this on https://github.com/graphql/express-graphql/blob/main/src/renderGraphiQL.ts plus the graphiql readme recommending upgrading to 1.4.7 so I was under the impression that 1.4.7 is the latest version. Will try upgrading to 2.2.0 and verifying that everything's working, but maybe we should merge this first and I'll submit a subsequent PR for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!