Open aoi opened 1 year ago
Hey @aoi :wave: thanks for raising this! I'm going to transfer this over to our API repo for tracking purposes, but unfortunately this is not currently supported. There is an active feature request to support this, would you mind sharing your thoughts or adding a 👍 ? https://github.com/aws-amplify/amplify-category-api/issues/775#issuecomment-1234820704
Hello @josefaidt. Thank you for your reply and transfering this issue. Also I'm preparing a PR for fixing this issue. I will submit PR in few days.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.16.1
Amplify CLI Version
12.1.1
What operating system are you using?
Windows, Ubuntu
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No.
Describe the bug
amplify mock
ignoresoverride.ts
.For example, there are ModelA (ModelATable) and ModelB (ModelBTable). If you want to access the ModelBTable in ModelA pipeline, you can write the code below in override.ts.
(
QuerylistModelAsauth1FunctionQuerylistModelAsauth1Function.AppSyncFunction
is generatedQuery.listModelAs.auth.2.req.vtl
which is extended resolver afterauth.1.req.vtl
.)When executing
amplify build
, an output stack fileModelA.json
inbuild/stacks
has"DataSourceName": "ModelBTable",
instead ofNONE_DS
.But when executing
amplify mock api
, this data source will beNONE_DS
because ofamplify mock
ignoresoverride.ts
.Expected behavior
override.ts is supposed to be effect when execute
amplify mock
.Reproduction steps
amplify override api
override.ts
. e.g., Writeconsole.log('override');
as debug log in override method.amplify mock api
, but not debug log.Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: