Skip to content

Commit

Permalink
fix: correct wirteToDirectory for graphql-codegen format
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch committed Sep 22, 2023
1 parent 7452e45 commit 138da96
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/model-generator/src/generate_api_code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ export const generateApiCode = async (
target: props.typeTarget,
multipleSwiftFiles: props.multipleSwiftFiles,
});
return { ...documents, ...types };

return {
writeToDirectory: async (directoryPath: string) => {
await Promise.all([
documents.writeToDirectory(directoryPath),
types.writeToDirectory(directoryPath),
]);
},
};
}

return documents;
Expand Down

0 comments on commit 138da96

Please sign in to comment.