commercetools-docs-kit
commercetools-docs-kit copied to clipboard
Refactor the data structure in the graphql schema to support all content types
At the moment, the data structure in the GraphQL surface defines specifically which content types are allowed and supported. Every time we want to introduce a new content type, we need to adjust the data structure just to be able to render the raml spec.
Ideally, the data structure should not need to know the content type and should support all of them. This would also simplify the request components. Place of the defined GraphQL schema: https://github.com/commercetools/commercetools-docs-kit/blob/main/packages/gatsby-transformer-raml/src/schema/define-raml-resource.js#L116
Follow up from: #1462