diff --git a/graphene_django/registry.py b/graphene_django/registry.py index 488fbb2..21fed12 100644 --- a/graphene_django/registry.py +++ b/graphene_django/registry.py @@ -13,7 +13,8 @@ class Registry(object): # assert self.get_type_for_model(cls._meta.model) == cls, ( # 'Multiple DjangoObjectTypes registered for "{}"'.format(cls._meta.model) # ) - self._registry[cls._meta.model] = cls + if not getattr(cls._meta, 'skip_registry', False): + self._registry[cls._meta.model] = cls def get_type_for_model(self, model): return self._registry.get(model) diff --git a/graphene_django/types.py b/graphene_django/types.py index 8174f05..ff88779 100644 --- a/graphene_django/types.py +++ b/graphene_django/types.py @@ -58,6 +58,7 @@ class DjangoObjectTypeMeta(ObjectTypeMeta): only_fields=(), exclude_fields=(), interfaces=(), + skip_registry=False, registry=None ) if DJANGO_FILTER_INSTALLED: