It looks like when updating the resolver data sour...
# sst
m
It looks like when updating the resolver data source in the appsync construct you have to remove it, deploy, add it back, and redeploy. Changing the data source does not result in an update.
f
Oh I see. Do you have a snippet of what it was set to before and after?
m
Hey sorry for the late reply. It’s going from lambda resolver to vtl
From
Copy code
"Query license": "mainDS",
To:
Copy code
"Query license":  {
                dataSource: "dynamoDS",
                resolverProps: {
                    requestMappingTemplate: MappingTemplate.fromFile("src/mapping-templates/Query.license.req.vtl"),
                    responseMappingTemplate: MappingTemplate.fromString("$utils.toJson($context.result)")
                }
            }
f
Thanks man! Was tied up yesterday with the Python release. I’m going to take a look at this today.
m
Np. Thanks
f
Hey @Mike McCall, I had a chance to dig into this. It seems to be a known AppSync/Amplify issue. Here’s a link to the discussion - https://github.com/aws/aws-cdk/issues/13269
Apparently this issue has been around for years?! Removing and recreating the GraphQL API works, but that doesn’t make sense for production usage. The Amplify community seems to suggest this workaround - https://github.com/aws-amplify/amplify-cli/issues/682
m
Thanks @Frank
@Frank I did end up finding a fix for this. https://github.com/serverless-stack/serverless-stack/pull/418
f
Oh nice! I’m going to cut a release with this today.
Released this in v0.26.0
Thanks again for looking into this!
m
Excellent. thank you!