Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appsync: release 1.91.0 breaks appsync resolvers #13357

Closed
smacintyre opened this issue Mar 3, 2021 · 3 comments
Closed

appsync: release 1.91.0 breaks appsync resolvers #13357

smacintyre opened this issue Mar 3, 2021 · 3 comments
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@smacintyre
Copy link

smacintyre commented Mar 3, 2021

Release 1.91.0 contains an breaking change for appsync revolvers and appears to make deploying unit resolvers impossible now. This was caused by the PR: #12973 -- this was not documented in the breaking changes section of the release notes.

Also the documentation is not up to date. According to the docs, if pipelineConfig is an empty array or undefined, a unit resolver is created. The change in #12973 breaks this.

Reverting to 1.90.1 doesn't fix the issue.

Reproduction Steps

   const data = graphqlApi.addDynamoDbDataSource('MainDataSource', table);

    data.createResolver({
      typeName: 'Mutation',
      fieldName: 'createVideo',
      requestMappingTemplate: MappingTemplate.fromFile(
        join(this.resolverDir, 'Mutation.createVideo.req.vtl')),
      responseMappingTemplate: MappingTemplate.dynamoDbResultItem(),
    });

What did you expect to happen?

To create a unit resolver -- this is what happened in prior versions.

What actually happened?

No resolver is created

Environment

  • **CDK CLI Version :1.91.0
  • **Framework Version: 1.91.0
  • **Node.js Version: v14.16.0
  • OS :
  • **Language (Version):4.1.5

Other

Right now, I have no idea of how to work around this.


This is 🐛 Bug Report

@smacintyre smacintyre added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 3, 2021
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Mar 3, 2021
@cynicaljoy
Copy link

seems to be a duplicate of #13269

@MrArnoldPalmer
Copy link
Contributor

The issue re: resolvers is in #13269. This was fixing a previously breaking change @smacintyre, I'm sorry this wasn't explicitly called out in the changelog I should have required the breaking change annotation on the PR but made a mistake.

This issue stems from the cloudformation/appsync side unfortunately and we aren't quite sure how to handle it from the CDK side for both problems. IE only one resolver per field and/or the "successful" deploy of resolvers that aren't wired correctly. Experimentation and investigation is required and contributions are welcome on this front.

As for workarounds, @bigkraig talks about versioning resolvers in his app in #13269 and looks like some other workarounds are mentioned in this amplify issue. Worst case scenario deleting and recreating the GraphqlApi may be required.

@aws-cdk/aws-appsync L2 constructs are experimental and more breaking changes are expected, we will do our best to note these in the changelog but their usage in production workflows is not recommended without extreme caution. In addition the docs need a refresh in places, I created a separate issue to track a general revision. Closing this in favor of #13269 & #13502.

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants