I am not able to call nested resolvers using graphql-tools. I have filed bug on github but haven't got any reply yet.
https://github.com/apollographql/graphql-tools/issues/1026.
Nested fields of my schema are not getting called while querying.
Schema
type XYZ {
title: String
}
type NestedLevel1 {
reference: XYZ
}
type ABCD {
title: String
reference: XYZ
nestedLevel1: NestedLevel1
}
type Query {
ABCDList(limit: Int, skip: Int): [ABCD]
}
Resolvers
const Resolvers = {
Query: {
ABCDList: () => []
},
ABCD: {
reference: () => [] // this function is being called
nestedLevel1: {
reference: () => [] // this function is not being called
}
}
}
Resolver function of top level "reference" is being called but not "nestedLevel1.reference" resolver. Please correct me if I am doing something wrong.