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

@graphql-tools/mock v8.7.2 introduces breaking changes via @graphql-tools/scheam v9 upgrade #4642

Closed
4 tasks
alexandrebodin opened this issue Aug 10, 2022 · 9 comments

Comments

@alexandrebodin
Copy link

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox

    Make sure to fork this template and run yarn generate in the terminal.

    Please make sure the GraphQL Tools package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

When using @graphql-toosl/mock ^8.0.0 & @graphql-tools/schema ^8.0.0. at the same time, an incompatibility appeared with @graphql-tools/merge where extractExtensionsFromSchema moved from one package to the other. The two versions of the /merge dependencies are installed and unless with yes yarn resolutions we can't fix it.

Those packages being quite coupled we often use them together.

Unless a quick patch is done we will migrate /schema to v9 to fix this on our side.

To Reproduce
Steps to reproduce the behavior:

Expected behavior

The v8.7.2 of /mock could keep targeting a v8 of /schema and a v9 of the /mock lib could be released to avoid breaking changes.

Environment:

  • OS: mac
  • @graphql-tools/...:
  • NodeJS: 16

Additional context

We are encountering this issue in Strapi here strapi/strapi#14048.

@ardatan
Copy link
Owner

ardatan commented Aug 10, 2022

Sorry for inconvenience but I couldn't reproduce the issue here.
https://stackblitz.com/edit/typescript-v5wv4w?file=package.json,index.ts,index.html
We didn't release a major version on mocks package on purpose. I don't think it is mocks package but merge package that is missing major version fixed in this PR;
#4643

@alexandrebodin
Copy link
Author

alexandrebodin commented Aug 10, 2022

Actually after thinking about it I even think the @graphql-tools/[email protected] should be a v9 as it removed a function without bumping a major version.

@ardatan
Copy link
Owner

ardatan commented Aug 10, 2022

But first we need to revert it as a patch release then release a major.

@alexandrebodin
Copy link
Author

alexandrebodin commented Aug 10, 2022

@ardatan Yes exactly adding the function to schema isn't breaking but removing it from merge would be indeed

@alexandrebodin
Copy link
Author

Happy to help if I can.

@ardatan
Copy link
Owner

ardatan commented Aug 10, 2022

For the next time, I'd appreciate if you can share a reproduction on CodeSandbox or StackBlitz. Other than that, creating this issue is really helpful for me to realize my mistake :)
Thanks again.
It will be available in a few minutes on NPM.
#4644

@alexandrebodin
Copy link
Author

alexandrebodin commented Aug 10, 2022

Sure thing hard to reproduce easily as it kinda depends whether npm/node will want to load one version or the other anyway but noted for next time ;)

Thank you for the reactivity 🎉

@ardatan
Copy link
Owner

ardatan commented Aug 10, 2022

Could you confirm it's been fixed?

@alexandrebodin
Copy link
Author

I can confirm this was fixed with the new patch release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants