Skip to content

Instantly share code, notes, and snippets.

View maxymczech's full-sized avatar
🃏
We live in a society

Maksym Shcherban maxymczech

🃏
We live in a society
View GitHub Profile
@maxymczech
maxymczech / graphql-codegen-enums-plugin.md
Last active April 8, 2024 08:17
GraphQL Code Generator plugin to extract all Enum type descriptions

Normally graphql-codegen will export Enum descriptions as comments, like this:

export enum GenderEnum {
  // Female person <-- this is the description
  Female = 'female',
  // Male person
  Male = 'male',
  // Other person
 Other = 'other'