digidem / comapeo-mobile

The next version of Mapeo mobile
GNU General Public License v3.0
5 stars 1 forks source link

Deal with schema errors more gracefully #449

Closed EvanHahn closed 2 months ago

EvanHahn commented 3 months ago

If someone is on a newer version of the schema, we shouldn't error unless it's backwards-incompatible.

For example, if there's a new field on Observation that we don't recognize, we shouldn't error.

gmaclennan commented 3 months ago

This mainly applies to enums. The main issue to deal with is future attachment types.

achou11 commented 2 months ago

A quick look through the existing codebase and I'm not sure if there's anything that stands out as needing changes to account for this right now. The only potential one is maybe this, but this is done at the query level, so not sure if that strictly needs changing for now.

https://github.com/digidem/comapeo-mobile/blob/470a568b0552f4f41e876dc10c936af8b6c59e36/src/frontend/hooks/server/media.ts#L64