import deepmerge from 'deepmerge' ; import { IResolvers } from '@graphql-tools/utils' ; import { makeExecutableSchema } from '@graphql-tools/schema' ; import UserService from '../application/user/userService' ; import userSchemacreator from './user/graphql' ; export default ( { userService } ) => { const Query = `
    type Query {
      _empty: String
    }
    type Mutation {
      _empty: String
    }
   ` ; const resolvers = { } ; const userSchema = userSchemacreator ( userService ) ; return makeExecutableSchema ( { resolvers : deepmerge . all ( [ resolvers , userSchema . resolvers ] ) as IResolvers , typeDefs : [ Query , userSchema . typeDef ] , } ) ; } ;