Skip to content

Conversation

IvanGoncharov
Copy link
Member

Explanation: Object.create(null) returns value of any type.
So below construct is not reported by TS even in "strict" mode:

const foo = Object.create(null);

Fixing this issue in extendSchema requires adding more code since we
can't put all extensions nodes into one collection without loosing
type-safety.

This PR also makes buildSchema/extendSchema ~40% faster
image

Explanation: `Object.create(null)` returns value of `any` type.
So bellow construct is not reported by TS even in "strict" mode:
```ts
const foo = Object.create(null);
```
Fixing this issue in `extendSchema` requires adding more code since we
can't put all extensions nodes into one collection without loosing
typesafety.
@IvanGoncharov IvanGoncharov added the PR: polish 💅 PR doesn't change public API or any observed behaviour label Aug 10, 2022
@netlify
Copy link

netlify bot commented Aug 10, 2022

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit b9fcf36
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/62f407f35883b60009019073
😎 Deploy Preview https://deploy-preview-3690--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

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

@IvanGoncharov IvanGoncharov merged commit c9f968b into graphql:main Aug 10, 2022
@IvanGoncharov IvanGoncharov deleted the pr_branch4 branch August 10, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: polish 💅 PR doesn't change public API or any observed behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant