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

Save recipe graphql #23

Merged
merged 6 commits into from
Jan 20, 2024
Merged

Save recipe graphql #23

merged 6 commits into from
Jan 20, 2024

Conversation

barneyb
Copy link
Member

@barneyb barneyb commented Jan 20, 2024

support create/update/deleted of recipes via graphql

Instead of using Spring's MultipartFile directly, wrap it with an Upload
type of our own, and use that for all the storage. Currently, that's
recipes and textract. This is to facilitate supporting the same actions
from GraphQL, which speaks Servlet API (no Spring). Along the way, get
rid of IOException, since we always wrap and rethrow anyway.

For similar reasons, move the recipe photo upload handling out of the
controller and down into the service layer.
The S3 client ends up closing the stream, but doesn't guarantee that it
will. In fact, it takes care to put the original stream back (after
replacing it with its digest-y one) for the caller to close as needed.
Be safe and do it explicitly; it's just a no-op if it happens twice.
@barneyb barneyb force-pushed the save-recipe-graphql branch from a040ee9 to 8c87107 Compare January 20, 2024 20:28
@barneyb barneyb merged commit e963308 into master Jan 20, 2024
1 check passed
@barneyb barneyb deleted the save-recipe-graphql branch January 20, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant