Fails to start api mock w/unhelpful error message
See original GitHub issueDescribe the bug When trying to run a local mock of an API that is successfully deployed to the cloud using cli version 3.15.0, I get the following error:
Scanning for plugins...
Plugin scan successful
The following types do not have '@auth' enabled. Consider using @auth with @model
[redacted]
Learn more about @auth here: https://aws-amplify.github.io/docs/cli-toolchain/graphql#auth
GraphQL schema compiled successfully.
Edit your schema at /[…]amplify/backend/api/[…]/schema.graphql or place .graphql files in a directory at /[…]amplify/backend/api/[…]/schema
Data source of type AMAZON_ELASTICSEARCH is not supported by local mocking. A NONE data source will be used.
Failed to start API Mock endpoint TypeError: Cannot read property 'name' of undefined
Desktop (please complete the following information):
- OS: macOS 10.15.1
- CLI Tools v3.15.0
- Node v10.16.3
Additional context My schema is fairly complex, comprising 30-some different data sources, custom resolvers and so on. I can push to AWS no problem, so not an enormous deal, but would be nice to have local mocking capability for testing our custom resolvers.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (13 by maintainers)
Top Results From Across the Web
Mock API generation failing with unhelpful error message
I'm trying to get the SwaggerHub API Auto Mocking integration to work, but the integration keeps failing with "Could not generate API mock....
Read more >Failed to start API Mock endpoint Error: CloudFormation stack ...
So your mock api would be up and running without a datastore and would not help in kind of local testing if you...
Read more >Setting up mock servers | Postman Learning Center
Mock server quick start · In Postman, send a request to any API. · In the response pane, select Save Response > Save...
Read more >Run your mock REST APIs anywhere with Mockoon CLI
Mockoon is a set of free and open-source API mocking tools. ... This tutorial will help you put up on track with the...
Read more >Mock API Generation with Twilio's OpenAPI Spec
Congratulations on starting your (maybe first) Prism mock server! ... request as the real Twilio API would, and is throwing a 401 error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having the same issue here and been waiting for it for a long time now. Also, is the
enhancement
label correct here? Shouldn’t it be a bug since it causes mock to fail?we could definately improve this and add support for all query/mutations except for the
search*
queries. Let me mark this as enhancement for mock