Skip to content

Commit

Permalink
fix: Merge resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-smartive committed Sep 6, 2023
1 parent e40e550 commit 557cb4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/api/execute.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { makeExecutableSchema } from '@graphql-tools/schema';
import { IResolvers } from '@graphql-tools/utils';
import { GraphQLResolveInfo, Source, execute as graphqlExecute, parse } from 'graphql';
import { merge } from 'lodash';
import { Context, generate, get, getResolvers } from '..';

export const execute = async ({
Expand All @@ -17,10 +18,7 @@ export const execute = async ({

const schema = makeExecutableSchema({
typeDefs: document,
resolvers: {
...generatedResolvers,
...additionalResolvers,
},
resolvers: merge(generatedResolvers, additionalResolvers),
});

const contextValue: Context = {
Expand Down

0 comments on commit 557cb4d

Please sign in to comment.