Open ggcespia opened 1 month ago
Is there some setting I can disable to make this stop doing this? I don't see any "mock cleanup" or the like. Is there some value in a json file I can tweak?
After looking at the Amplify source and grep'ing my drive for testMode, I found amplify/backend/amplify-meta.json - where testMode: true was put in there under my api.output (most likely from the mock command). I set that to false and now, the ..dangerously.. values do not get reinstated. Obviously, this isn't the 'clean' way to do this, but until someone fixes the code to somehow shut off that testMode value, this worked for me. "api": { "myapiname": { "output": { ... "testMode": false <- this was true when generating the offending aws_appsync_dangerously_connect_to_http_endpoint_for_testing } } }
Hi @ggcespia can you confirm whether this behavior occurs in development or in production? What should happen in prod is that the CLI regenerates the config with testMode being false
by default.
Transferring this to amplify-category-api
for better support as it is a build-time issue
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Not applicable
Amplify Version
v5
Amplify Categories
Not applicable
Backend
Amplify CLI
Environment information
Describe the bug
I used amplify mock function once. Now, every time I do an amplify push --y - it keeps putting back in
in my amplifyconfiguration.json and was-exports.js
I saw an old bug with this, but am unable to find it again - it was closed as fixed. Clearly it isn't fixed, as it keeps happening. I am using cli version 12.10.3
Expected behavior
Not to put the mock "aws_appsync_dangerously_connect_to_http_endpoint_for_testing": true in the config files.
Reproduction steps
delete "aws_appsync_dangerously_connect_to_http_endpoint_for_testing": true, from the 2 config files amplify mock function
amplify push --y
"aws_appsync_dangerously_connect_to_http_endpoint_for_testing": true
shows back up again in the config files.
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
Where does one notify the 'mock' engine to stop mocking? With the dangerously_connect options, all of my GraphQL subscriptions stop working.