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

Fix: make public API compatible with 'exactOptionalPropertyTypes' #3670

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

IvanGoncharov
Copy link
Member

exactOptionalPropertyTypes is recommended option that was added in TS 4.4 but our public API
was not compatible with it.
Meaning if the project was using graphql-js and had this enabled this flag they lost the ability to pass undefined values explicitly.

Context: discovered as part of #3649 investigation.

@IvanGoncharov IvanGoncharov added the PR: bug fix 🐞 requires increase of "patch" version number label Jul 8, 2022
@netlify
Copy link

netlify bot commented Jul 8, 2022

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit a60f4fc
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/62d834ddc3e0c6000963a5c7
😎 Deploy Preview https://deploy-preview-3670--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Jul 8, 2022

Hi @IvanGoncharov, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

It's recomended option that was added in TS 4.4 but our public API
was not compatible with it. Meaning if project was using graphql-js
and had this enabled this flag they lost ability to explicitly pass
undefined values.
@IvanGoncharov IvanGoncharov merged commit bef5534 into graphql:main Jul 21, 2022
@IvanGoncharov IvanGoncharov deleted the pr_branch4 branch July 21, 2022 12:29
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Jul 21, 2022
Continuation of graphql#3670
Basically allow to have code like this:
```js
parse(document, GraphQLServerConfig.parserOptions)
```
to pass TS check with 'exactOptionalPropertyTypes'
IvanGoncharov added a commit that referenced this pull request Jul 22, 2022
Continuation of #3670
Basically allow to have code like this:
```js
parse(document, GraphQLServerConfig.parserOptions)
```
to pass TS check with 'exactOptionalPropertyTypes'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant