Skip to content

Commit c25b1cb

Browse files
authored
Merge pull request #71 from tomyitav/resolvers-fix-export
fix: resolver exports addition
2 parents 54c805b + 4223e8b commit c25b1cb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/commands/resolver/resolver-constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const resolverPrefix =
22
"import { IAppContext } from '@src/interfaces/IAppContext'\n\nconst resolveFunctions = {\n"
3-
export const resolverSuffix = '};\n'
3+
export const resolverSuffix = '}\n\nexport default resolveFunctions\n'
44
export const operationPrefix = ': {\n'
55
export const operationSuffix = '\t},\n'
66
export const operationFuntionsSuffix = '\t},\n'

test/output/expected/commands/resolver/test-resolver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ const resolveFunctions = {
1212
subscribe: (rootObj: any, args: any, context: IAppContext) => {},
1313
},
1414
},
15-
};
15+
}
16+
17+
export default resolveFunctions

test/output/expected/commands/resolver/tweets-test-resolver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ const resolveFunctions = {
1414
deleteTweet(rootObj: any, args: any, context: IAppContext) {},
1515
markTweetRead(rootObj: any, args: any, context: IAppContext) {},
1616
},
17-
};
17+
}
18+
19+
export default resolveFunctions

0 commit comments

Comments
 (0)