diff --git a/packages/plugins/typescript-resolvers/src/root.handlebars b/packages/plugins/typescript-resolvers/src/root.handlebars index 6fe7a641792..5d208631257 100644 --- a/packages/plugins/typescript-resolvers/src/root.handlebars +++ b/packages/plugins/typescript-resolvers/src/root.handlebars @@ -81,7 +81,7 @@ export type IResolvers = { {{/each}} } & { [typeName: string] : { [ fieldName: string ]: ( Resolver | SubscriptionResolver ) } }; -export type IDirectiveResolvers = { +export type IDirectiveResolvers = { {{#each definedDirectives}} {{ name }}{{#unless @root.config.strict}}?{{/unless}}: {{ convert name 'typeNames'}}DirectiveResolver; {{/each}} diff --git a/packages/plugins/typescript-resolvers/tests/typescript-resolvers.spec.ts b/packages/plugins/typescript-resolvers/tests/typescript-resolvers.spec.ts index a960dac0166..f3916fada6f 100644 --- a/packages/plugins/typescript-resolvers/tests/typescript-resolvers.spec.ts +++ b/packages/plugins/typescript-resolvers/tests/typescript-resolvers.spec.ts @@ -1241,7 +1241,7 @@ describe('Resolvers', () => { `); expect(content).toBeSimilarStringTo(` - export type IDirectiveResolvers = { + export type IDirectiveResolvers = { modify?: ModifyDirectiveResolver; skip?: SkipDirectiveResolver; include?: IncludeDirectiveResolver;