I am using mongoose and graphql on the backend and I am having some trouble returning a nested mongoose object in the graphql resolver. I am able to save the data to the database with a graphql mutation but when I try to return the data I get back null in the graphql playground.
If anyone is able to help this would be much appreciated.
If yo look at my mongoose schema you will see that I have username nested inside the customer object. I do not know how to get access to this in graphql, if anyone is able to provide me with the solution it would be of grat help. Thanks a million