INNER CODE UNIT · Python
GenericForeignKeyInputType
eamigo86/graphene-django-extras · graphene_django_extras/base_types.py:124
class GenericForeignKeyInputType(graphene.InputObjectType):
"""GraphQL input type for Django GenericForeignKey fields."""
app_label = graphene.Argument(graphene.String, required=True)
id = graphene.Argument(graphene.ID, required=True)
model_name = graphene.Argument(graphene.String, required=True)
class Meta:
"""Meta configuration for GenericForeignKeyInputType."""
description = " Auto generated InputType for a model's GenericForeignKey field "
# ************************************************ #
# ************** CUSTOM BASE TYPES *************** #
# ************************************************ #
class Binary(graphene.Scalar):
"""BinaryArray is used to convert a Django BinaryField to the string form."""