Skip to content
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

feat: support for new graphene-federation #237

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
bump: v0.4.4
Added support for new graphene-federation
Drop support for python 3.8
  • Loading branch information
mak626 committed Jun 4, 2024
commit a57720950d7c484026846a28be2db74cc5075fe3
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.9", "3.10", "3.11","3.12"]
python: ["3.9", "3.10", "3.11","3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion examples/django_mongoengine/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==3.2.24
Django==3.2.25
pytest==4.6.3
pytest-django==3.5.1
mongoengine==0.27.0
Expand Down
9 changes: 3 additions & 6 deletions graphene_mongo/advanced_types.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import base64

import graphene
from graphene_federation import shareable


@shareable # Support Graphene Federation v2
class FileFieldType(graphene.ObjectType):
content_type = graphene.String()
md5 = graphene.String()
chunk_size = graphene.Int()
length = graphene.Int()
data = graphene.String()

# Support Graphene Federation v2
_shareable = True

@classmethod
def _resolve_fs_field(cls, field, name, default_value=None):
v = getattr(field.instance, field.key)
Expand All @@ -38,12 +37,10 @@ def resolve_data(self, info):
return None


@shareable # Support Graphene Federation v2
class _CoordinatesTypeField(graphene.ObjectType):
type = graphene.String()

# Support Graphene Federation v2
_shareable = True

def resolve_type(self, info):
return self["type"]

Expand Down
Loading
Loading