-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New option
onlyEnums
for Typescript (#7718)
* New option `onlyEnums` for Typescript * added generated types * Create odd-snakes-act.md * fix: typo with only operations being removed Co-authored-by: Charly POLY <[email protected]>
- Loading branch information
1 parent
8f2230a
commit 9a5f31c
Showing
8 changed files
with
131 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@graphql-codegen/typescript": patch | ||
"@graphql-codegen/visitor-plugin-common": patch | ||
--- | ||
|
||
New option `onlyEnums` for Typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** A list of options for the sort order of the feed */ | ||
export enum FeedType { | ||
/** Sort by a combination of freshness and score, using Reddit's algorithm */ | ||
Hot = 'HOT', | ||
/** Newest entries first */ | ||
New = 'NEW', | ||
/** Highest score entries first */ | ||
Top = 'TOP', | ||
} | ||
|
||
/** The type of vote to record, when submitting a vote */ | ||
export enum VoteType { | ||
Cancel = 'CANCEL', | ||
Down = 'DOWN', | ||
Up = 'UP', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** The episodes in the Star Wars trilogy */ | ||
export enum Episode { | ||
/** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ | ||
Empire = 'EMPIRE', | ||
/** Star Wars Episode VI: Return of the Jedi, released in 1983. */ | ||
Jedi = 'JEDI', | ||
/** Star Wars Episode IV: A New Hope, released in 1977. */ | ||
Newhope = 'NEWHOPE', | ||
} | ||
|
||
/** Units of height */ | ||
export enum LengthUnit { | ||
/** Primarily used in the United States */ | ||
Foot = 'FOOT', | ||
/** The standard unit around the world */ | ||
Meter = 'METER', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export type TestQueryVariables = Exact<{ [key: string]: never }>; | ||
|
||
export type TestQuery = { | ||
__typename?: 'Query'; | ||
testArr1?: Array<string | null> | null; | ||
testArr2: Array<string | null>; | ||
testArr3: Array<string>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9a5f31c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
graphql-code-generator – ./
graphql-code-generator.vercel.app
www.graphql-codegen.com
graphql-code-generator-theguild.vercel.app
graphql-code-generator-git-master-theguild.vercel.app
graphql-code-generator.com
graphql-codegen.com
www.graphql-code-generator.com