# Resolver errors with ts-node

**URL:** <https://community.apollographql.com/t/resolver-errors-with-ts-node/7507>\
**Category:** Server\
**Tags:** server\
**Created:** [May 10, 2024, 5:40pm UTC](https://community.apollographql.com/t/resolver-errors-with-ts-node/7507 "2024-05-10T17:40:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmacjamf](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jmacjamf/32/5090_2.png) [@jmacjamf](https://community.apollographql.com/u/jmacjamf)\
**Post date:** [May 10, 2024, 5:40pm UTC](https://community.apollographql.com/t/resolver-errors-with-ts-node/7507/1 "2024-05-10T17:40:40Z")

</div>

I can’t seem to get past this error, and any pointers would be much appreciated.

Type ‘(_: {}, { id }: Partial, { dataSources }: DataSourceContext) =\> Promise\<BuildingListModel[]\>’ is not assignable to type ‘Resolver\<ResolverTypeWrapper, {}, DataSourceContext, Partial\>’.  
Type '(_: {}, { id }: Partial, { dataSources }: DataSourceContext) =\> Promise\<BuildingListModel\>’ is not assignable to type ‘ResolverFn\<ResolverTypeWrapper, {}, DataSourceContext, Partial\>’.  
Type ‘Promise\<BuildingListModel\>’ is not assignable to type ‘ResolverTypeWrapper | Promise\<ResolverTypeWrapper\>’.  
Type ‘Promise\<BuildingListModel\>’ is not assignable to type ‘Promise’.  
Type ‘BuildingListModel’ has no properties in common with type ‘BuildingList’.ts(2322)  
types.ts(366, 3): The expected type comes from property ‘buildinglist’ which is declared here on type ‘QueryResolvers\<DataSourceContext, {}\>’  
(property) buildinglist?: Resolver\<ResolverTypeWrapper, {}, DataSourceContext, Partial\>

---

<div class="post-metadata">

**Author:** ![jmacjamf](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jmacjamf/32/5090_2.png) [@jmacjamf](https://community.apollographql.com/u/jmacjamf)\
**Post date:** [May 10, 2024, 5:43pm UTC](https://community.apollographql.com/t/resolver-errors-with-ts-node/7507/2 "2024-05-10T17:43:58Z")

</div>

For what it is worth, my types.ts file does not seem to be importing Model(s) into it.

Here is my resolvers.ts config:

import { Resolvers } from ‘./types’

export const resolvers: Resolvers = {  
Query: {  
buildinglist: (_, { id }, { dataSources }) =\> {  
return dataSources.inventoryAPI.getBuilding(id);  
},  
buildingsAll: (_, \_\_, { dataSources }) =\> {  
return dataSources.inventoryAPI.getBuildings();  
},  
},  
}

---

<div class="post-metadata">

**Author:** ![jmacjamf](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jmacjamf/32/5090_2.png) [@jmacjamf](https://community.apollographql.com/u/jmacjamf)\
**Post date:** [May 10, 2024, 7:50pm UTC](https://community.apollographql.com/t/resolver-errors-with-ts-node/7507/3 "2024-05-10T19:50:43Z")

</div>

I think I got past the resolver errors. The data model is kind of quirky, not just simple single json coming back. It has a summary that wraps an array of json objects.

Now, I am just trying to get real data back (make a different topic for this)
