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

Downgrade graphql dependency version #3134

Merged
merged 4 commits into from
Jul 17, 2023
Merged

Conversation

CarlosCortizasCT
Copy link
Contributor

Summary

Downgrade graphql dependency version

Description

Some users using our @commercetools-frontend/create-mc-app to create a new Custom Application are experiencing problems when running the command because of a peer dependency miss match with the graphql package.

More info here: #3110

Our starter templates rely on the eslint-plugin-graphql package to add static validation to graphql mutations and queries.
This package uses the graphql one as a peer dependency and the one we are currently using is 16.x which is not supported by the former.

We're downgrading our graphql version to the latest supported by the plugin (v15) as we don't want to loose that static check.

We also created an issue in the eslint-plugin-graphql repository asking for graphql v16.x version support.

@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2023

🦋 Changeset detected

Latest commit: 4c9b8be

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

This PR includes changesets to release 35 packages
Name Type
@commercetools-applications/merchant-center-template-starter-typescript Minor
@commercetools-frontend/application-shell-connectors Minor
@commercetools-applications/merchant-center-template-starter Minor
@commercetools-frontend/jest-preset-mc-app Minor
@commercetools-frontend/application-shell Minor
@commercetools-frontend/mc-scripts Minor
@commercetools-frontend/application-components Minor
@commercetools-frontend/permissions Minor
@commercetools-local/playground Minor
@commercetools-frontend/cypress Minor
@commercetools-frontend/codemod Minor
@commercetools-local/visual-testing-app Minor
@commercetools-website/components-playground Minor
@commercetools-backend/eslint-config-node Minor
@commercetools-backend/express Minor
@commercetools-backend/loggers Minor
@commercetools-frontend/actions-global Minor
@commercetools-frontend/application-config Minor
@commercetools-frontend/assets Minor
@commercetools-frontend/babel-preset-mc-app Minor
@commercetools-frontend/browser-history Minor
@commercetools-frontend/constants Minor
@commercetools-frontend/create-mc-app Minor
@commercetools-frontend/eslint-config-mc-app Minor
@commercetools-frontend/i18n Minor
@commercetools-frontend/jest-stylelint-runner Minor
@commercetools-frontend/l10n Minor
@commercetools-frontend/mc-dev-authentication Minor
@commercetools-frontend/mc-html-template Minor
@commercetools-frontend/notifications Minor
@commercetools-frontend/react-notifications Minor
@commercetools-frontend/sdk Minor
@commercetools-frontend/sentry Minor
@commercetools-frontend/url-utils Minor
@commercetools-website/custom-applications Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 14, 2023

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-fm5z6agvn-commercetools.vercel.app
https://appkit-sha-67cab33e58c1eec91ebc266a9c9d3dcbb1b3c415.commercetools.vercel.app
https://appkit-pr-3134.commercetools.vercel.app

Built with commit 4c9b8be.
This pull request is being automatically deployed with vercel-action

@CarlosCortizasCT CarlosCortizasCT merged commit 0aa9c18 into main Jul 17, 2023
@CarlosCortizasCT CarlosCortizasCT deleted the cm-downgrade-graphql branch July 17, 2023 06:59
@emmenko
Copy link
Member

emmenko commented Jul 17, 2023

Wouldn't this cause issues in our internal apps that use v16? 🤔

@CarlosCortizasCT
Copy link
Contributor Author

Wouldn't this cause issues in our internal apps that use v16? 🤔

Yes, that's a good point.
I've just checked and they fail indeed.

I wanted to downgrade the version in all packages for consistency, but maybe it would be better to just do it in the templates.

What do you think?

@emmenko
Copy link
Member

emmenko commented Jul 17, 2023

It seems to me that this is mostly an issue when using npm as it's strict by default regarding peer dependencies.

In the issue it mentioned that by using npm install --legacy-peer-deps it does work.

I would keep using graphql v16. For the issue with npm we could update the create-mc-app CLI to include the --legacy-peer-deps option when using npm as the package manager

As for the eslint-plugin-graphql, it seems it's not maintained much. I already opened an issue some time ago to investigate using another library #1978.

What do you think?

@CarlosCortizasCT
Copy link
Contributor Author

It seems to me that this is mostly an issue when using npm as it's strict by default regarding peer dependencies.

In the issue it mentioned that by using npm install --legacy-peer-deps it does work.

I would keep using graphql v16. For the issue with npm we could update the create-mc-app CLI to include the --legacy-peer-deps option when using npm as the package manager

As for the eslint-plugin-graphql, it seems it's not maintained much. I already opened an issue some time ago to investigate using another library #1978.

What do you think?

Ok.
Makes sense to me.

emmenko added a commit that referenced this pull request Jul 17, 2023
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

Successfully merging this pull request may close these issues.

5 participants