Skip to content

Commit

Permalink
Maintain JSONField in graphene_django.compat module (graphql-python#1429
Browse files Browse the repository at this point in the history
)

Fixes graphql-python#1428

This should improve backwards compatibility, fixing issues in downstream
packages (notably graphene-django-cud
tOgg1/graphene-django-cud#109, and also
graphene-django-extras, both of which depended on
`graphene_django.compat.JSONField`).

Co-authored-by: Steven DeMartini <sjdemartini@users.noreply.github.com>
  • Loading branch information
2 people authored and superlevure committed Jul 19, 2023
1 parent be405f8 commit 4611ab9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphene_django/compat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# For backwards compatibility, we import JSONField to have it available for import via
# this compat module (https://github.com/graphql-python/graphene-django/issues/1428).
# Django's JSONField is available in Django 3.2+ (the minimum version we support)
from django.db.models import JSONField


class MissingType:
def __init__(self, *args, **kwargs):
pass
Expand Down

0 comments on commit 4611ab9

Please sign in to comment.