GeoPard Tutorials
Ask or search…
K

75. Mutation: Generate "EquationMap" asynchronously

Generate "ZonesMap" for the "Field" asynchronously.
The asynchronous approach puts a task (Generate "generateEquationMap") to process and the Subscription will be received as soon as the processing is finished.
1
mutation GenerateEquationMap {
2
generateEquationMapAsync(input: {
3
fieldUuid: "<placeholder_of_field_uuid>"
4
gridPixelSizeX: 30
5
gridPixelSizeY: 30
6
type: FERTILIZING
7
equationAsText:"""calculated = yield_vol/prod + 0.5
8
if calculated >= 9:
9
result = 35
10
elif calculated >=5 and calculated < 9:
11
result = 25
12
else:
13
result = 15
14
"""
15
equationResultVariable: "result"
16
dataVariables: [{
17
variable: "yield_vol"
18
yieldDatasetUuid: "<placeholder_of_yielddataset_uuid>"
19
yieldAttribute: "Yld_Vol_We"
20
}, {
21
variable: "prod"
22
yieldDatasetUuid: "<placeholder_of_yielddataset_uuid>"
23
yieldAttribute: "Prod_ac_h_"
24
}]
25
}) {
26
uuid
27
fieldUuid
28
statusCode
29
}
30
}