Remix.run Logo
hdjrudni 14 hours ago

> If a server gets inputs it doesn't recognize

If you just slap in Zod, the server will drop the extra inputs. If you hate Zod, it's not hard to design a similar thing.

> or if client and server disagree that a field is optional or not

Doesn't GQL have the concept of required vs optional fields too? IIUC it's the same problem. You just have to be very diligent about this, not really a way around it. Protobufs went as far as to remove 'required' out of the spec because this was such a common problem. Just don't make things required, ever :-)