Assistance with apollo


How do you implement a resolver within a resolver?

const resolver = {

   Query: {
     function: () => {
       // code for function    
     use.function: () => {
       // this doesn't work


And in meteor the code is as follows:

     'function'() {
        // code for function
      'use.function'() {
        // works in meteor'function');


What exactly are you trying to accomplish? You typically wouldn’t use a resolver within a resolver, although you might use a resolver to resolve fields on a document that was resolved via another resolver.

For example, you could have an items resolver that returns a list of items and then an itemTitle resolver that resolves the ‘title’ field on each item.


What is the means of doing a on a resolver to get the function working within another resolver?