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

feat: upgrade Mercurius, Apollo, GraphQL to the latest versions #2636

Merged
merged 72 commits into from
Mar 10, 2023

Conversation

kamilmysliwiec
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Martin Kagamino Lehoux and others added 30 commits August 29, 2022 08:35
Fields with arguments are usually resolved using a separate method with the
@ResolveField() annotation.
Having such field generated as a required property thus proves quite cumbersome
 as it forces assigning a value in the result of parent @query() method.

This makes fields with arguments always optional.
fix(deps): remove git conflict markers and keep latest rimraf version
Fixing pipes spec tests.
Changed ApolloServerPluginInlineTraceDisabled reference to '@apollo/server/plugin/disabled';
Changed ApolloServerBase references to ApolloServer.
chore: fixing pipes and code-first spec tests and some code cleanup
@luas10c
Copy link
Contributor

luas10c commented Feb 15, 2023

@kamilmysliwiec

You can get the latest changes from this repository check it out and pull it to fix the playground issue

https://github.com/luas10c/graphql

@kamilmysliwiec
Copy link
Member Author

There's no "playground" issue. Current settings are intentional ant this was discussed several times in the past

@Davide-Gheri Davide-Gheri mentioned this pull request Feb 20, 2023
6 tasks
…ents-optional

fix(graphql): generate fields as optional when they contain arguments
feat(types): Type check Field defaultValue
@kamilmysliwiec
Copy link
Member Author

nestjs/docs.nestjs.com#2640

"@nestjs/common": "8.4.7",
"@nestjs/platform-fastify": "8.4.7",
"@nestjs/testing": "8.4.7",
"@mercuriusjs/federation": "^1.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@mercuriusjs/federation": "^1.0.0",
"@mercuriusjs/federation": "^1.0.1",

see here: https://github.com/mercurius-js/mercurius-federation/releases

"@nestjs/platform-fastify": "8.4.7",
"@nestjs/testing": "8.4.7",
"@mercuriusjs/federation": "^1.0.0",
"@mercuriusjs/gateway": "^1.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@mercuriusjs/gateway": "^1.0.0",
"@mercuriusjs/gateway": "^1.2.0",

see here: https://github.com/mercurius-js/mercurius-gateway/releases

"fastify": "4.12.0",
"mercurius": "8.13.2",
"mercurius": "12.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"mercurius": "12.0.0",
"mercurius": "12.2.0",

see here: https://github.com/mercurius-js/mercurius/releases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there are big changes in these small updates, they should solve small problems 😄, however I wanted to point this out before the release of the new version of the @nestjs/graphql package🙌

@simplenotezy
Copy link

simplenotezy commented Mar 8, 2023

Really cool @kamilmysliwiec - happy to see this, just as I was playing around tonight with upgrading our rather huge application from express to fastify.

What's the proper way to install the 'next' versions exactly? I'd love to test it out, and perhaps provide some feedback, if I should stumble upon anything. I've tried following your additions here: https://github.com/nestjs/docs.nestjs.com/pull/2640/files

I am getting package dependency conflicts. An example repo showing nest 9 running with graphql and fastify would be nice.

More specifically I am getting this error, when trying to pull in the next releases:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @nestjs/apollo@11.0.0-next.2
npm ERR! Found: @nestjs/graphql@11.0.0-next.2
npm ERR! node_modules/@nestjs/graphql
npm ERR!   @nestjs/graphql@"^11.0.0-next.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/graphql@"^10.1.7" from @nestjs/apollo@11.0.0-next.2
npm ERR! node_modules/@nestjs/apollo
npm ERR!   @nestjs/apollo@"^11.0.0-next.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @nestjs/graphql@10.2.0
npm ERR! node_modules/@nestjs/graphql
npm ERR!   peer @nestjs/graphql@"^10.1.7" from @nestjs/apollo@11.0.0-next.2
npm ERR!   node_modules/@nestjs/apollo
npm ERR!     @nestjs/apollo@"^11.0.0-next.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@kamilmysliwiec
Copy link
Member Author

@simplenotezy you can use the --legacy-peer-deps flag for now (when installing packages)

@simplenotezy
Copy link

Thanks @kamilmysliwiec - I'll do that!

@kamilmysliwiec kamilmysliwiec merged commit 1dc229a into master Mar 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the next branch March 10, 2023 10:09
@rhutchison rhutchison mentioned this pull request Mar 28, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.