serverless-appsync / serverless-appsync-simulator

A simple wrapper around Amplify AppSync Simulator to test serverless AppSync Apis
MIT License
127 stars 69 forks source link

Update to @aws-amplify/amplify-appsync-simulator >= 2.8.0 #182

Open a-marcel opened 1 year ago

a-marcel commented 1 year ago

This PR offers a helper function that backports the new file structure/configuration of amplify-appsync-simulator >= 2.8.0 so that the current serverless-appsync-simulator can work as expected.

It's required to outsource all appsync configurations to an external file. as example serverless.appsync-api.yml. In serverless.yml it's required to link this file in two places:

appSync: ${file(serverless.appsync-api.yml)}

custom:
  appSync:
    - ${file(serverless.appsync-api.yml)}

The external file should be in the new format.

Currently Code (Javascript transformators) are not supported

I deployed to AWS and it works for me as expected.

In addition to the version update, i added some more granular configuration for local development.

178