-
Notifications
You must be signed in to change notification settings - Fork 0
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: Enable calling the Soil ID API with input from frontend #588
Conversation
…hes simultaneously
|
||
export const soilDataSlopePercent = ( | ||
data: SoilData, | ||
): Maybe<number> | undefined => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I know it's weird to review after you already submitted this but just realized -- is the Maybe
necessary here? Can we just make it undefined
if it's ever null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the thought. This is definitely more annoying, but the convention in code that interacts with the GraphQL layer seems to use Maybe | undefined
all over the place and I thought it'd be better to keep consistent with that standard, since all this is in the client-shared
codebase.
* When soil data is available, we use the data-based soil match API. | ||
* When the input is only a location, we use the location-based soil match API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tm-ruxandra @paulschreiber FYI: Oh actually it appears I was misinterpreting the code. It appears that even a site with no data entered will call the data-based one. So it was in fact correct to say the division is Site vs Temporary Location.
Description
(Creating from Ruxandra's work)
Related Issues
Implements #653
Verification steps
Look at the soil ID info screen for a given soil (need the corresponding mobile-client work)