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

(introspection) - Fix usage of executeSync causing invalid mjs import #2251

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

kitten
Copy link
Member

@kitten kitten commented Feb 4, 2022

Fix #2250

Summary

Resolves an issue where the old version of babel-plugin-modular-graphql wasn't warning us forcefully about executeSync not being present in all versions we support, which resulted in it being imported from "graphql", which then instantiates non-mjs duplicate modules in some versions of Node.js (i.e. when Node isn't in ESM mode)

Set of changes

  • Replace executeSync with execute

This release will simply then cause a rebuild and re-release with [email protected]

@kitten kitten requested a review from JoviDeCroock February 4, 2022 22:01
@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2022

🦋 Changeset detected

Latest commit: dc8d51e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/introspection Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CherryDT
Copy link

CherryDT commented Feb 4, 2022

(i.e. when Node isn't in ESM mode)

Hm, in my issue I was on node 16 and had "type": "module" in my package.json so it should be in ESM mode, shouldn't it?

@kitten
Copy link
Member Author

kitten commented Feb 4, 2022

@CherryDT Yup, on a second check, you're right. I must've done something wrong in debugging and it indeed interprets it as CJS always. I believe the issue is that graphql@16 still doesn't come with a package.json:exports entry. I really thought it did but I was mistaken, so this won't work regardless of the Node.js mode and is rather caused by being in ESM mode, not by not being in it 😆

@kitten kitten merged commit b795a49 into main Feb 8, 2022
@kitten kitten deleted the fix/introspection-import branch February 8, 2022 19:41
@urql-ci urql-ci mentioned this pull request Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants