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

feat(AppSync): Add JS resolver helper & matchers #79

Merged
merged 9 commits into from
Jan 18, 2024
Merged

Conversation

bboure
Copy link
Member

@bboure bboure commented Jan 18, 2024

No description provided.

@bboure bboure marked this pull request as ready for review January 18, 2024 10:43
@bboure bboure requested a review from bayoudhi January 18, 2024 10:43
}
}
`);
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I removed support for string predicates.
in AppSync, it should always be a JSON anyway.
if the evaluated mapping template is not a valid js, it will throw an error.


### `appSyncResolver(input: AppSyncResolverInput)`

- `code`: A string with the `APPSYNC_JS`` resolver code
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bayoudhi I am considering changing this to be the path of a file, both in JS and mapping templates (VTL).

I don't think that inline code is useful. Especially in this context.
The code will always live somewhere else

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question/issue would be to what directory the path should be relative to and how to handle that inside sls-jest.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the end this is what I did

Copy link
Member

@bayoudhi bayoudhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect! Thank you for improving the internal implementation too!

@bboure bboure changed the title feat(matchers): Add AppSync JS Resolver Matchers feat(AppSync): Add AppSync JS Resolver Helper & Matchers Jan 18, 2024
@bboure bboure changed the title feat(AppSync): Add AppSync JS Resolver Helper & Matchers feat(AppSync): Add Resolver Helper & Matchers Jan 18, 2024
@bboure bboure changed the title feat(AppSync): Add Resolver Helper & Matchers feat(AppSync): Add JS resolver helper & matchers Jan 18, 2024
@bboure bboure merged commit 4d68da7 into develop Jan 18, 2024
6 checks passed
@bboure bboure deleted the more-appsync branch January 18, 2024 15:28
Copy link

github-actions bot commented Feb 8, 2024

🎉 This PR is included in version 1.0.0-alpha.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants