def GraphQLSnippet(field_name: str, snippet_model: str):

    class Mixin(GraphQLField):

        def __init__(self):
            (app_label, model) = snippet_model.lower().split('.')
            mdl = ContentType.objects.get(app_label=app_label, model=model)
            if mdl:
                self.field_type = registry.snippets[mdl.model_class()]
            else:
                self.field_type = graphene.String
            self.field_name = field_name
    return Mixin
def GraphQLSnippet(field_name: str, snippet_model: str):

    class Mixin(GraphQLField):

        def __init__(self):
            (app_label, model) = snippet_model.lower().split('.')
            mdl = ContentType.objects.get(app_label=app_label, model=model)
            if mdl:
                self.field_type = registry.snippets[mdl.model_class()]
            else:
                self.field_type = graphene.String
            self.field_name = field_name
    return Mixin