Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename 'MaybePromise' to 'PromiseOrValue' (#1798)
Suggested by @martijnwalraven `MaybePromise` name confuses users into thinking: `execute`/`graphql` returns either Promise or null/undefined. Also in our codebase we use `[Mm]aybe*` to represent optional things, e.g.: https://github.com/graphql/graphql-js/blob/8c96dc8276f2de27b8af9ffbd71a4597d483523f/src/language/visitor.js#L353 https://github.com/graphql/graphql-js/blob/8c96dc8276f2de27b8af9ffbd71a4597d483523f/src/language/printer.js#L244
- Loading branch information
1 parent
84ea1c9
commit 329f357
Showing
6 changed files
with
28 additions
and
28 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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
* @flow strict | ||
*/ | ||
|
||
export type MaybePromise<+T> = Promise<T> | T; | ||
export type PromiseOrValue<+T> = Promise<T> | T; |
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