Handling Custom Annotations in Schema Structs with Extend and Union
Another question. I'm trying to do what I'd call pretty advanced stuff with Schema without fully understanding it.
I have some custom annotations in some fields in some of my schema structs. I want to traverse the schema (across extend, union and struct). FWIW, I don't need to handle nested structs. It is a flat object, that may be built with
There may be a way to do this in an idiomatic way, but I ended up creating a function that walks the AST pretty manually, and that seems to work.
However, at the type level I haven't been successful. I can handle a struct and unions, but I fail to handle the case of
I have some custom annotations in some fields in some of my schema structs. I want to traverse the schema (across extend, union and struct). FWIW, I don't need to handle nested structs. It is a flat object, that may be built with
extend and union.There may be a way to do this in an idiomatic way, but I ended up creating a function that walks the AST pretty manually, and that seems to work.
However, at the type level I haven't been successful. I can handle a struct and unions, but I fail to handle the case of
extend.