amplify-cli: Running `amplify api add-graphql-datasource` yields strange error
Before opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
12.22.1
Amplify CLI Version
7.6.2
What operating system are you using?
mac
Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
Following this instruction set https://docs.amplify.aws/cli-legacy/graphql-transformer/relational/, I follow the instructions to exactness. At the point of running amplify api add-graphql-datasource
, I get a strange error. The documentation seems to be legacy(if you look to where the documentation exists), but I failed to find any updated version.
Expected behavior
The amplify command line interface should allow you to run amplify api add-graphql-datasource
without error. If that command is deprecated it should state as such.
Reproduction steps
- Follow the steps in https://docs.amplify.aws/cli-legacy/graphql-transformer/relational/
GraphQL schema(s)
# Put schemas below this line
Log output
🛑 Cannot destructure property 'serviceWalkthroughFilename' of 'serviceMetadata' as it is undefined.
TypeError: Cannot destructure property 'serviceWalkthroughFilename' of 'serviceMetadata' as it is undefined.
at Object.addDatasource (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@aws-amplify/amplify-category-api/src/provider-utils/awscloudformation/index.ts:300:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@aws-amplify/amplify-category-api/src/commands/api/add-graphql-datasource.ts:37:21)
at Object.executeAmplifyCommand (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/@aws-amplify/amplify-category-api/src/index.ts:222:5)
at executePluginModuleCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:204:3)
at executeCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:30:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/index.ts:205:5)
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (5 by maintainers)
@Dennis-Dekker thanks for the heads up, I’ll grab the latest update.
It looks like the docs aren’t fully up to date with every feature flag released, but generally speaking this is where you would find feature flag information: https://docs.amplify.aws/cli/reference/feature-flags/