-
I am using mergeTypeDefs to merge multiple graphql files. But mergeTypeDefs removes all comment lines. Comment lines are used for AppSync docs how do I merge multiple graphql files and keep comments?. this is my code to merge const mergeGraphqlDefinitions = (): void => {
const loadedFiles = loadFilesSync(separateSdlPathPattern);
const typeDefs = mergeTypeDefs(loadedFiles);
const printedTypeDefs = print(typeDefs);
fs.writeFileSync(mergedSdlPath, printedTypeDefs);
}; |
Beta Was this translation helpful? Give feedback.
Answered by
ardatan
Mar 29, 2022
Replies: 1 comment 1 reply
-
Hi! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
matart15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
You can use this flag https://github.com/ardatan/graphql-tools/blob/master/packages/merge/src/typedefs-mergers/merge-typedefs.ts#L54 and now mergeTypeDefs will return a string instead of an object.