const t=()=>({Country:{async states(t,e,{stateService:r,stateDataLoader:c}){const n={...e.criteria,country:t.id},o=await c.withOptions.load({id:t.id,searchKey:"country",...e});return{totalCount:await r.count(n),data:o}}},Query:{countries:async(t,e,{countryService:r})=>r.getAllWithCount(e),country:(t,{id:e},{countryService:r})=>r.get(e),countryByName:(t,{name:e},{countryService:r})=>r.getName(e)},Mutation:{createCountry:(t,{country:e},{countryService:r})=>r.create(e),updateCountry:(t,{id:e,country:r},{countryService:c})=>c.update(e,r,!1),deleteCountry:(t,{id:e},{countryService:r})=>r.delete(e)}});export{t as countryResolvers};