aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
89 stars 79 forks source link

Mocking and HTTP Data Sources #278

Open carlosdubus opened 4 years ago

carlosdubus commented 4 years ago

I got the following when trying to run a local GraphQL and a HTTP data source:

Data source of type HTTP is not supported by local mocking. A NONE data source will be used.

Is there any way I can test a HTTP data source without pushing? I'm simply running a server locally at localhost:3000 and I would like to do requests to it with custom resolvers. Seems like it shouldn't be that hard to implement (unless I'm missing something) so I'm open to contribute and create a pull request.

Let me know your thoughts. Thanks

UnleashedMind commented 4 years ago

No, the Amplify CLI does not have support for HTTP datasource type in mocking. Testing a HTTP data source usually involves connecting to an external http data source that's is not "Local". I also marked this issue as an enhancement, our team will evaluate its viability.

carlosdubus commented 4 years ago

My question was if you are open to a pull request so users can run resolvers for local/remote HTTP data sources and possibly a local ElasticSearch endpoint when running AppSync simulator.

yuth commented 4 years ago

Yes we are open for a pull request.

Bentheburrito commented 3 years ago

Hi all! If nobody's currently working on this issue, I'd like to take it up :)

kevin-woodward commented 3 years ago

Any progress on this? This would enable me hugely :)

Bentheburrito commented 3 years ago

Hi @kevin-woodward! Sorry for the late response, I am still working on this, and hope to have a PR up this week. You can track progress on this branch :slightly_smiling_face:

kevin-woodward commented 3 years ago

Bumping this... I think the PR looks good and just needs an approving review from someone qualified

benbrunyee commented 2 years ago

Any update on this? Would be amazing to have this feature!

prashant-joshi-25 commented 1 year ago

bump!