Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove auto generated enum #680

Merged
merged 2 commits into from
Nov 30, 2021
Merged

Remove auto generated enum #680

merged 2 commits into from
Nov 30, 2021

Conversation

jiqiang90
Copy link
Contributor

No description provided.

@@ -44,8 +44,8 @@ export function getAllJsonObjects(_schema: GraphQLSchema | string): GraphQLObjec
export function getAllEnums(_schema: GraphQLSchema | string) {
const schema = typeof _schema === 'string' ? buildSchema(_schema) : _schema;
return Object.values(schema.getTypeMap())
.filter(isEnumType)
.map((node) => node);
.filter((r) => r.astNode !== undefined)
Copy link
Collaborator

@ianhe8x ianhe8x Nov 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine two filters in one line

@ianhe8x ianhe8x merged commit 16c8203 into main Nov 30, 2021
@ianhe8x ianhe8x deleted the fix-remove-default-enum branch November 30, 2021 03:29
bz888 pushed a commit that referenced this pull request Jun 3, 2022
* Remove auto generated enum

* add return type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants