keystone
keystone copied to clipboard
Document field has vague GraphQL type
Creating a dynamic page from a document loses all typing. Querying document(hydrateRelationships: true) just returns JSON, rather than strict types. In strapi, this keeps the types and I would do ...on ComponentHero { ... } to return them. Keeping strict types means I can use types on the front end from GraphQL and don't have to write them/keep them in sync manually.
Even types that exist for other API calls, i.e. when using'fields.relationship`, are lost as JSON.