I’m having a problem of using the resolver for nested Lambda in Dgraph. The implementation is working with the Apollo but for some reason when I tried it with Dgraph it doesn’t work. The context is, I have to create custom types for a lambda where in I can categorize then by their purposes to avoid conflicts with Shared Schema. I’m gonna show the sample below:
type UserQueries{
getUsers(userId: String!): UsersInformation! @lambda
}
type AddressQueries{
getAllAddresses: [Addresses]! @lambda
}
type AddressMutations{
registerAddress(address: String!): Boolean @lambda
}
type UserMutations{
registerUser(userId: String!, username: String!): Boolean @lambda
}
type Mutation{
user: UserMutations @lambda
address: AddressMutations @lambda
}
type Query{
user: UserQueries @lambda
address: AddressQueries @lambda
}
the issue will be when I send a query to the resolver, it cannot get the arguments that I pass from the query that I sent. The only thing that always comes up is Undefined or Empty. Can you provide me your own implementation to support this schema structure?
async function _addressResolver({args, graphql}) {}
async function _userResolver({args, graphql}) {}
If I’m trying this approach the _userResolver is not calling
self.addGraphQLResolvers({
“Query.user”: () => ({})
“UserQueries.getUsers”: _userResolver
})
It’s not written in docs so it’s hard for us to identify this type of problem.
PS: Those schemas are just an example it’s not the actual schema we are using but they have the same structure