How to merge multiple resolvers file into one in apollo graphql

I want to merge multiple resolvers written on different files into one file and then export that file to apollo-server for building up. I used express-graphql previously, I am pasting the code how I do it in express-graphql which does not take effect in apollo graphql, what’s the equivalent in apollo

const SingleResolver = require('./singleResolvers')
const NestedResolver = require('./nestedResolvers')

const RootResolver = {
    ...SingleResolver,
    ...NestedResolver
}

module.exports = RootResolver;

How to do the same thing in apollo-graphql. It will also be really helpful if anyone can give me suggestion to merge typedefs also in apollo

Read more here: Source link