Skip to content

predicates: replace instanceof with symbol based brand check#4468

Merged
yaacovCR merged 4 commits intographql:nextfrom
yaacovCR:use-brand
Aug 8, 2025
Merged

predicates: replace instanceof with symbol based brand check#4468
yaacovCR merged 4 commits intographql:nextfrom
yaacovCR:use-brand

Conversation

@yaacovCR
Copy link
Copy Markdown
Contributor

@yaacovCR yaacovCR commented Aug 6, 2025

This PR updates our predicates to rely on a brand check rather than instanceof.

We still pass brand check to our instanceOf utility and in development mode use the same logic as previously to throw our error with multiple instances of graphql.

@yaacovCR yaacovCR requested a review from a team as a code owner August 6, 2025 10:23
@yaacovCR
Copy link
Copy Markdown
Contributor Author

yaacovCR commented Aug 6, 2025

image

@yaacovCR yaacovCR added the PR: feature 🚀 requires increase of "minor" version number label Aug 6, 2025
@yaacovCR yaacovCR force-pushed the use-brand branch 4 times, most recently from 5c673b9 to cfb5e91 Compare August 8, 2025 09:55
Comment thread src/jsutils/instanceOf.ts Outdated
@yaacovCR yaacovCR changed the title predicates: use brand check in production predicates: use symbol based brand check instead of instanceof Aug 8, 2025
@yaacovCR yaacovCR changed the title predicates: use symbol based brand check instead of instanceof predicates: replace instanceof with symbol based brand check Aug 8, 2025
@yaacovCR yaacovCR merged commit 02d302e into graphql:next Aug 8, 2025
16 checks passed
@yaacovCR yaacovCR deleted the use-brand branch August 8, 2025 19:14
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 17, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 17, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 17, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 18, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 19, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Dec 22, 2025
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Dec 22, 2025
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Dec 22, 2025
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Jan 27, 2026
…#4468)

This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 22, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 23, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 24, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 24, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 24, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
yaacovCR added a commit that referenced this pull request Feb 24, 2026
This PR updates our predicates to rely on a brand check rather than `instanceof`.

We still pass brand check to our `instanceOf` utility and in development mode use the same logic as previously to throw our error with multiple instances of `graphql`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants