Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add readme to vtl resolvers directory #6718

Merged
merged 5 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud.
For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers)
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ describe('create artifacts', () => {

it('writes the default custom resources stack', async () => {
await cfnApiArtifactHandler.createArtifacts(addRequestStub);
expect(fs_mock.copyFileSync.mock.calls.length).toBe(1);
expect(fs_mock.copyFileSync.mock.calls[0]).toEqual([
expect(fs_mock.copyFileSync.mock.calls.length).toBe(2);
expect(fs_mock.copyFileSync.mock.calls[1]).toEqual([
path.join(rootAssetDir, 'cloudformation-templates', 'defaultCustomResources.json'),
path.join(backendDirPathStub, category, addRequestStub.serviceConfiguration.apiName, 'stacks', 'CustomResources.json'),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class CfnApiArtifactHandler implements ApiArtifactHandler {
const stacksDirectoryPath = path.join(resourceDir, stacksDirName);
if (!fs.existsSync(stacksDirectoryPath)) {
fs.mkdirSync(stacksDirectoryPath);
fs.copyFileSync(path.join(rootAssetDir, 'resolver-readme', 'README.md'), `${resolverDirectoryPath}/README.md`);
rajrajhans marked this conversation as resolved.
Show resolved Hide resolved
}

// During API add, make sure we're creating a transform.conf.json file with the latest version the CLI supports.
Expand Down