#✅ - Does amplify mock support override.ts ?

5 messages · Page 1 of 1 (latest)

thick cosmos
#

I want to access another DynamoDB table in some queries. So I extended Amplify-generated resolver which are ...auth.2.req/res.vtl after ...auth.1.req.vtl. And wrote override.ts like blow

resources.models["Task"].appsyncFunctions["QuerylistTasksauth1FunctionQuerylistTasksauth1Function.AppSyncFunction"].dataSourceName = "ProjectUserTable";
// QuerylistTasksauth1FunctionQuerylistTasksauth1Function is extended Amplify-generated resolver name.

This code allows listTasks(using TaskTable as Data Source) query to access ProjectUserTable.
I used this page (https://github.com/aws-amplify/amplify-cli/issues/9623) as a reference.

This setting works fine on cloud environment. (after amplify push)

But it does not work on amplify mock.
Does amplify mock support override.ts ?

GitHub

Which Category is your question related to? api Amplify CLI Version 7.6.8 Provide additional details e.g. code snippets Is this possible to change data source for new resolver that extends Amplify-...

thick cosmos
#

I checked and debugged amplify-cli's source codes. As long as I see amplify mock does not support override.ts.

sour sun
#

Hey 👋 in short, as you have found, no this is not currently supported

thick cosmos
oak oarBOT
#

✅ - Does amplify mock support override.ts ?