Creating a DjangoObjectType without either the `fields` or the `exclude` option is deprecated
stephencockerill opened this issue · comments
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 theexclude
option is deprecated. Add an explicitfields = '__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.
I think the issue is fixed on the graphene
side rather than here.