Skip to content

can this support generating enum with given values? #65

@tx0c

Description

@tx0c

GraphQL allows enum with allow values in resolvers
https://www.apollographql.com/docs/apollo-server/schema/schema/#internal-values-advanced

but this is generating always the enum's literal string value, is there anyway can support given values?

https://blog.logrocket.com/what-you-need-to-know-about-graphql-enums/

to make GraphQL

enum AuthType {
 GOOGLE =  'google-auth',
 GITHUB =  'github-auth',
 OUTLOOK = 'outlook-auth',
}

to generate TypeScript

export const enum AuthType {
 GOOGLE =  'google-auth',
 GITHUB =  'github-auth',
 OUTLOOK = 'outlook-auth',
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions