Skip to content

Conversation

@knipec
Copy link
Contributor

@knipec knipec commented Oct 29, 2025

Description

Changes for Rate Soil Match feature:

  • Rename SiteDataPush to UserDataPush

  • Deprecate update_soil_metadata mutation, in favor of push_user_data mutation. I'd forgotten to mark update_soil_metadata as deprecated as part of feat: Make new big push mutation and deprecate old one #1900

  • Change the backend type so that the Typescript type is userRatings: Array<UserRatingEntry>; instead of userRatings: Array<Maybe<UserRatingEntry>>;
    There shouldn't be any time that we have an entry in userRatings that is null.

  • Change the mutation response in the backend to not have separate error fields for each sub-push (soilData and soilMetadata). Exceptions caught at that level are highly unlikely and will now just be caught as an exception for the mutation as a whole.

Related Issues

To address techmatters/terraso-mobile-client#3107 and techmatters/terraso-mobile-client#3068

@knipec knipec requested a review from johannesparty October 29, 2025 22:09
@knipec knipec changed the title fix: Deprecate update_soil_metadata mutation, in favor of push_site_data mutation fix: Deprecate old mutation & update userRatings type Nov 12, 2025
@knipec knipec changed the title fix: Deprecate old mutation & update userRatings type fix: update a couple types & deprecate old mutation Nov 13, 2025
Exceptions caught at that level are highly unlikely and will now just be caught as an exception for the mutation as a whole
@knipec knipec changed the title fix: update a couple types & deprecate old mutation fix: [rate soil match] update a couple types & deprecate old mutation Nov 21, 2025
@knipec knipec changed the title fix: [rate soil match] update a couple types & deprecate old mutation fix: [rate soil match] rename to UserDataPush + update types + deprecate old mutation Nov 21, 2025
Copy link
Contributor

@johannesparty johannesparty left a comment

Choose a reason for hiding this comment

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

ok, finished an easy one!
all looks fine to me.
I did wonder why you no longer needed try/catch.

result = SoilDataPush.mutate_and_get_payload(
root, info, soil_data_entries=soil_data_entries
)
soil_data_results = result.results
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove the try/except?

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.

3 participants