Sync mobile data
As a mobile app user, I want to be able to synchronise data for inspection with corresponding section events and observations.
AC
-
custom GraphQL types for batch uploading Inspection data are created (InspectionBatch, SectionEventBatch, ObservationBatch) -
Mutation for processing and uploading data with new types is created -
Errors are handled, when supplied data does not exist -
Tests
Review
AC
-
custom GraphQL types for batch uploading Inspection data are created (InspectionBatch, SectionEventBatch, ObservationBatch) -
Mutation for processing and uploading data with new types is created -
Errors are handled, when supplied data does not exist -
Tests
Format for InspectionBulk type:
{
"transectId": "/tmd/api/index.php/transects/1",
"observerIds": [
"/tmd/api/index.php/users/1"
],
"datetimeFrom": "2021-11-18T12:11:50.497Z",
"datetimeTo": "2021-11-18T12:38:10.369Z",
"windBegin": 4,
"windEnd": 3,
"tempBegin": 12,
"tempEnd": 12,
"cloudinessBegin": 40,
"cloudinessEnd": 30,
"comment": "asdasd",
"sectionEvents": [
{
"comment": "asdasd",
"imageRefIds": [
"blob:http://localhost:8100/41bba1ed-777e-4eb4-b516-d79325df2749"
],
"observations": [
{
"developmentalStage": "imago",
"abundance": 1,
"outOfMethod": null,
"comment": "asdasdasd",
"sex": null,
"isDead": null,
"speciesId": null,
"imageRefIds": null
},
{
"developmentalStage": "egg",
"abundance": 2,
"outOfMethod": null,
"comment": null,
"sex": null,
"isDead": null,
"speciesId": null,
"imageRefIds": [
"blob:http://localhost:8100/67a6cbef-4beb-4277-9d25-a8b9b2f7f2d6"
]
}
],
"sectionId": "/tmd/api/index.php/sections/9"
},
{
"comment": null,
"imageRefIds": null,
"observations": null,
"sectionId": "/tmd/api/index.php/sections/10"
}
]
}
Edited by Michael Voigt