const t=()=>({State:{country:async(t,e,{countryDataLoader:a})=>t?.country?.name?t.country:a.load(t.country.toString()),async cities(t,e,{cityService:a,cityDataLoader:i}){const c={...e.criteria,state:t.id},r=await i.withOptions.load({id:t.id,searchKey:"state",...e});return{totalCount:await a.count(c),data:r}}},Query:{async states(t,e,{stateService:a},i){const c=await a.getAll(e);return{totalCount:await a.count(e.criteria),data:c}},state:(t,{id:e},{stateService:a})=>a.get(e)},Mutation:{createState:(t,{state:e},{stateService:a})=>a.create(e),updateState:(t,{id:e,state:a},{stateService:i})=>i.update(e,a,!1),deleteState:(t,{id:e},{stateService:a})=>a.delete(e)}});export{t as stateResolvers};