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

Creating a DjangoObjectType without either the fields or the exclude option is deprecated #355

Open
stephencockerill opened this issue Aug 21, 2023 · 1 comment

Comments

@stephencockerill
Copy link

Upgrading to wagtail 5.1 and graphene 3.3 results in the following deprecation warnings for all models registered with wagtail-grapple:

/home/wagtail/.local/lib/python3.9/site-packages/graphene/utils/subclass_with_meta.py:46: DeprecationWarning: Creating a DjangoObjectType without either the fields or the exclude option is deprecated. Add an explicit fields = '__all__' option on DjangoObjectType StubBlogPost to use all fields

The issue appears to be coming from grapple.actions.build_node_type:

    class StubMeta:
        model = stub_model

Based on the warning, there should be a fields = '__all__' attribute included.

@patillacode
Copy link

I think the issue is fixed on the graphene side rather than here.

graphql-python/graphene#1530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants