You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding is that schemas can't reliably be serialized/deserialized due to containing additional type information in [Kind] and other fields. But, is it possible to serialize/deserialize the schemas that are compiled by TypeCompiler? Looking at the output there's a code field that could be evaled at runtime. On first glance it looks like it would work. Is this a dumb idea? Is there a better way to add/remove schemas dynamically at runtime? (My ultimate goal is to store them in a database so that new data types can be added and validated without having to rebuild and redeploy the server).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My understanding is that schemas can't reliably be serialized/deserialized due to containing additional type information in [Kind] and other fields. But, is it possible to serialize/deserialize the schemas that are compiled by
TypeCompiler
? Looking at the output there's acode
field that could beeval
ed at runtime. On first glance it looks like it would work. Is this a dumb idea? Is there a better way to add/remove schemas dynamically at runtime? (My ultimate goal is to store them in a database so that new data types can be added and validated without having to rebuild and redeploy the server).Beta Was this translation helpful? Give feedback.
All reactions