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

How to set the data source on a pipeline resolve fn #924

Closed
gxxcastillo opened this issue Oct 25, 2022 · 2 comments
Closed

How to set the data source on a pipeline resolve fn #924

gxxcastillo opened this issue Oct 25, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@gxxcastillo
Copy link

Which Category is your question related to?
API

Amplify CLI Version
10.3.0

What AWS Services are you utilizing?
Appsync

Provide additional details e.g. code snippets. Be sure to remove any sensitive data.
I've been able to extend amplify generated VTL resolvers, however, how would I go about assigning their "data source"?

In my use case, my vtl resolver is doing a batch write and returning a bunch of IDs, I'm then creating a postUpdate resolver that takes one of those IDs and does a GetItem with it. Up until now, I've had to manually go through the appsync UI to accomplish this each time I push to a new environment and it would be great to have way to do that in the code.

@gxxcastillo gxxcastillo added the question Further information is requested label Oct 25, 2022
@ykethan ykethan added the duplicate This issue or pull request already exists label Oct 25, 2022
@ykethan
Copy link

ykethan commented Oct 25, 2022

Hey @gxxcastillo, thank you for reaching out. This workflow is currently not supported. The feature is currently being tracked here: #69. Please feel free in subscribing to the issue for any further updates.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
@gxxcastillo
Copy link
Author

The solution proposed here aws-amplify/amplify-cli#9623 (comment), which involves using override.ts to manually set the value of models.{ModelName}.appsyncFunctions.{ResolverName}.dataSourceName solved this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants