-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #320 from flavors/fix/allow-any
Fix allow_any function, support any root type name
- Loading branch information
Showing
18 changed files
with
104 additions
and
1,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
run: pip install .[doc] | ||
|
||
- name: Build docs | ||
run: poetry run sphinx-build -b html docs docs/_build | ||
run: sphinx-build -b html docs docs/_build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,25 @@ name: Publish | |
|
||
on: | ||
release: | ||
types: created | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- name: Install dependencies | ||
run: pip install build | ||
|
||
- name: Build | ||
run: poetry build | ||
run: python -m build | ||
|
||
- name: Publish to PyPI | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: poetry publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,32 @@ on: [push, pull_request] | |
|
||
jobs: | ||
build: | ||
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-18.04 | ||
name: Build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
django-version: ['2.0', '2.1', '2.2', '3.0', '3.1', '3.2'] | ||
python-version: ['3.8', '3.9', '3.10'] | ||
django-version: ['3.0', '3.1', '3.2', '4.0', '4.1', '4.2'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: py-${{ matrix.python-version }}-django-${{ matrix.django-version }}-${{ hashFiles('**/poetry.lock') }} | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-django-${{ matrix.django-version }}-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- name: Install Django | ||
run: pip install django==${{ matrix.django-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry add django==${{ matrix.django-version }} | ||
poetry install | ||
run: pip install -e .[test] | ||
|
||
- name: Tests | ||
run: poetry run scripts/test.sh | ||
run: scripts/test.sh | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ coverage.xml | |
dist/ | ||
docs/_build/ | ||
htmlcov/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import graphql | ||
|
||
try: | ||
from graphql.execution.execute import GraphQLResolveInfo | ||
except ImportError: | ||
from graphql.execution.base import ResolveInfo as GraphQLResolveInfo # noqa | ||
|
||
|
||
def get_root_type(info): | ||
if graphql.__version__.startswith("2"): | ||
return getattr(info.schema, f"get_{info.operation.operation}_type")() | ||
return getattr(info.schema, f"{info.operation.operation.value}_type") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
|
Oops, something went wrong.