Skip to content

Deep translation structure breaks generating gatsby types for Translation #226

@FrEaKmAn

Description

@FrEaKmAn

Describe the bug
If we have a translation with deep structure, like

{
  "languages": {
     "en": "English",
     "de": "Deutsch"
  }
}

it fails to generate correct Translation type in gatsby-types.d.ts. The translation is missing message.

To Reproduce
Steps to reproduce the behavior:

  1. Add example above as messages for any locale.
  2. Run build.
  3. Check gatsby-types.d.ts

Expected behavior

The Translation type should include

  readonly message: Maybe<Scalars['String']>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions