graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Fix passing a container class to InputObjectType

Open Perlence opened this issue 2 months ago • 0 comments

The issue was that when a container class was passed as a meta option, the default implementation of InputObjectTypeContainer started failing with the following:

    def __init__(self, *args, **kwargs):
        dict.__init__(self, *args, **kwargs)
>       for key in self._meta.fields:
                   ^^^^^^^^^^
E       AttributeError: 'InputObjectTypeContainer' object has no attribute '_meta'

I've also changed the type hint for the InputObjectTypeOptions.container to be a type, not an instance.

Perlence avatar Nov 27 '25 07:11 Perlence