diff --git a/graphene/types/base.py b/graphene/types/base.py index 29d60fef..a2014f44 100644 --- a/graphene/types/base.py +++ b/graphene/types/base.py @@ -40,6 +40,11 @@ class BaseType(SubclassWithMeta): return _meta.name = name or cls.__name__ _meta.description = description or trim_docstring(cls.__doc__) + + # Set all extra arguments onto the meta class as well + for key, value in _kwargs.items(): + setattr(_meta, key, value) + _meta.freeze() cls._meta = _meta super(BaseType, cls).__init_subclass_with_meta__() diff --git a/graphene/types/tests/test_objecttype.py b/graphene/types/tests/test_objecttype.py index 25025e4d..15ae7671 100644 --- a/graphene/types/tests/test_objecttype.py +++ b/graphene/types/tests/test_objecttype.py @@ -275,3 +275,12 @@ def test_objecttype_meta_with_annotations(): schema = Schema(query=Query) assert schema is not None + + +def test_objecttype_meta_extra_fields(): + class Query(ObjectType): + class Meta: + name = "MyQuery" + foo = "bar" + + assert Query._meta.foo == "bar"