I'm using a custom YAML type to process a string read from a Markdown frontmatter. This type generates an array of objects depending on the input, and it's not possible to know the exact shape of the resulting data.
This means, the graphql schema generated at compile time cannot infer the type, and throws an error. Is there a way to disable type annotation for a specific field in a frontmatter?
index.md
---
foo: !customType "[Foo][Bar]"
bar: !customType "[[a][b]][c]"
---
Then, I want to query it like:
query IndexQuery {
foo // Should give me [Object(Foo), Object(Bar)]
bar // Should give me [[Object(a), Object(b)], Object(c)]
}
I read this, but this seems to require me to create a new type based on a whole document which doesn't really scale.