Stun3R/strapi-generate-types

Missing type: `__component`

Opened this issue · 1 comments

Actual response:

{
  "id": 1,
  "__component": "some_category.some_name",
  "title": "...",
  ...

This is important, because in the dynamic zone, we want build different sections from the given data based on this key.

Basically, we get this type:

export type PageContentDynamicZone = ComponentA | ComponentB | ComponentC | Error;

export type ComponentA = {
  __typename?: '...';
  __component: 'some_category.some_name'; // <-- this is missing
  id: Scalars['ID'];
  title?: Maybe<Scalars['String']>;
  ...
};

@Stun3R Are you open to PRs regarding this?