express-graphql icon indicating copy to clipboard operation
express-graphql copied to clipboard

Rename type `MaybePromise` to `PromiseOrValue` as in `graphql-js`

Open kyarik opened this issue 4 years ago • 0 comments

MaybePromise<T> can be misinterpreted as Maybe<Promise<T>>. Naming this type as PromiseOrValue<T> makes it clear what this type represents and prevents the aforementioned possible misinterpretation. PromiseOrValue<T> is also defined in graphql-js (graphql-js/PromiseOrValue.d.ts), so it makes sense to keep the type name consistent.

kyarik avatar Apr 10 '21 20:04 kyarik