Closed alukach closed 1 week ago
Involves the usual changes needed for a model:
model-utils.ts
async-retry
luxon
To get typechecking to pass, we needed to update the CloseUploadInput GQL type. Currently, it has parts property being an array of possibly null values:
parts
null
https://github.com/tnc-ca-geo/animl-api/blob/90c9640b9c947244cf353ef737f1f59c62c0ab1d/src/api/type-defs/inputs/CloseUploadInput.ts#L7-L10
However, this caused problems when providing those parts to AWS SDK as the parts must not be null:
https://github.com/tnc-ca-geo/animl-api/blob/90c9640b9c947244cf353ef737f1f59c62c0ab1d/src/api/db/models/Batch.js#L198-L206
Relates to #187
What I'm changing
How I did it
Involves the usual changes needed for a model:
model-utils.ts
async-retry
andluxon
To get typechecking to pass, we needed to update the CloseUploadInput GQL type. Currently, it has
parts
property being an array of possiblynull
values:https://github.com/tnc-ca-geo/animl-api/blob/90c9640b9c947244cf353ef737f1f59c62c0ab1d/src/api/type-defs/inputs/CloseUploadInput.ts#L7-L10
However, this caused problems when providing those parts to AWS SDK as the parts must not be
null
:https://github.com/tnc-ca-geo/animl-api/blob/90c9640b9c947244cf353ef737f1f59c62c0ab1d/src/api/db/models/Batch.js#L198-L206
How you can test it
Relates to #187