aws-amplify / aws-amplify/amplify-cli
Allow local testing when referencing lambdas in schema that exist outside project
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
I would like to submit a pull request to change this line in `packages/amplify-util-mock/src/api/api.ts`:
```js
throw new Error(
'Local mocking does not support AWS_LAMBDA data source that is not provisioned in the project.\nEnsure that the environment is specified as described in https://aws-amplify.github.io/docs/cli-toolchain/graphql#function',
);
```
To be a warning. I would still like to test other functions that are part of the amplify project locally.
**Describe the solution you'd like**
Just warn the user instead of throwing an error.
**Describe alternatives you've considered**
commenting out the code that references functions that are not part of the project, but then the risk is committing it to the repo accidentally.
Contributor guide
Assessment
This issue has not been assessed yet.