import graphene

from .resolvers import resolve_malls
from .types import Mall
from ..core.fields import PrefetchingConnectionField

class SmopQueries(graphene.ObjectType):
    malls = PrefetchingConnectionField(
            Mall,
            description="List of malls"
        )

    def resolve_malls(self, info, **_kwargs):
        return resolve_malls(info)
