def GraphQLForeignKey(field_name: str, content_type: str, is_list: bool=False):

    class Mixin(GraphQLField):

        def __init__(self):
            (app_label, model) = content_type.lower().split('.')
            mdl = ContentType.objects.get(app_label=app_label, model=model)
            field_type = None
            if mdl:
                field_type = registry.models.get(mdl.model_class())
            if (field_type and is_list):
                field_type = graphene.List(field_type)
            super().__init__(field_name, field_type)
    return Mixin
def GraphQLForeignKey(field_name: str, content_type: str, is_list: bool=False):

    class Mixin(GraphQLField):

        def __init__(self):
            (app_label, model) = content_type.lower().split('.')
            mdl = ContentType.objects.get(app_label=app_label, model=model)
            field_type = None
            if mdl:
                field_type = registry.models.get(mdl.model_class())
            if (field_type and is_list):
                field_type = graphene.List(field_type)
            super().__init__(field_name, field_type)
    return Mixin