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

Sample 31: GraphQL Federation code-first does not work #11942

Closed
3 of 15 tasks
NilsMoller opened this issue Jun 29, 2023 · 7 comments
Closed
3 of 15 tasks

Sample 31: GraphQL Federation code-first does not work #11942

NilsMoller opened this issue Jun 29, 2023 · 7 comments
Labels
needs triage This issue has not been looked into

Comments

@NilsMoller
Copy link

NilsMoller commented Jun 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

The users application throws a GraphQLError: The schema is not a valid GraphQL schema error when starting.
The posts application throws a The "@apollo/subgraph" package is missing. error when starting.

Minimum reproduction code

N/A

Steps to reproduce

  1. Clone this repository
  2. Open sample 31: GraphQL Federation code-first
  3. Run npm install in all three projects (users, posts, gateway)
  4. Run the commands listed in the README
  5. See errors in console.

Expected behavior

The projects start correctly.

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

No response

NestJS version

10.0.3

Packages versions

Users

"dependencies": {
  "@apollo/gateway": "2.4.8",
  "@apollo/server": "4.7.5",
  "@apollo/subgraph": "2.4.8",
  "@nestjs/apollo": "12.0.3",
  "@nestjs/common": "10.0.3",
  "@nestjs/core": "10.0.3",
  "@nestjs/graphql": "12.0.3",
  "@nestjs/platform-express": "10.0.3",
  "graphql": "16.6.0",
  "graphql-tools": "9.0.0",
  "reflect-metadata": "0.1.13",
  "rimraf": "5.0.1",
  "rxjs": "7.8.1",
  "ts-morph": "19.0.0"
},
"devDependencies": {
  "@nestjs/cli": "10.0.5",
  "@nestjs/schematics": "10.0.1",
  "@nestjs/testing": "10.0.3",
  "@types/express": "4.17.17",
  "@types/jest": "29.5.2",
  "@types/node": "20.3.2",
  "@types/supertest": "2.0.12",
  "@typescript-eslint/eslint-plugin": "5.60.0",
  "@typescript-eslint/parser": "5.60.0",
  "eslint": "8.43.0",
  "eslint-config-prettier": "8.8.0",
  "eslint-plugin-prettier": "4.2.1",
  "jest": "29.5.0",
  "prettier": "2.8.8",
  "supertest": "6.3.3",
  "ts-jest": "29.1.0",
  "ts-loader": "9.4.3",
  "ts-node": "10.9.1",
  "tsconfig-paths": "4.2.0",
  "typescript": "5.1.3",
  "webpack": "5.88.0"
}

Posts

"dependencies": {
  "@apollo/federation": "0.38.1",
  "@apollo/gateway": "2.4.8",
  "@apollo/server": "4.7.5",
  "@nestjs/apollo": "12.0.3",
  "@nestjs/common": "10.0.3",
  "@nestjs/core": "10.0.3",
  "@nestjs/graphql": "12.0.3",
  "@nestjs/platform-express": "10.0.3",
  "graphql": "16.6.0",
  "graphql-tools": "9.0.0",
  "reflect-metadata": "0.1.13",
  "rimraf": "5.0.1",
  "rxjs": "7.8.1",
  "ts-morph": "19.0.0"
},
"devDependencies": {
  "@nestjs/cli": "10.0.5",
  "@nestjs/schematics": "10.0.1",
  "@nestjs/testing": "10.0.3",
  "@types/express": "4.17.17",
  "@types/jest": "29.5.2",
  "@types/node": "20.3.2",
  "@types/supertest": "2.0.12",
  "@typescript-eslint/eslint-plugin": "5.60.0",
  "@typescript-eslint/parser": "5.60.0",
  "eslint": "8.43.0",
  "eslint-config-prettier": "8.8.0",
  "eslint-plugin-prettier": "4.2.1",
  "jest": "29.5.0",
  "prettier": "2.8.8",
  "supertest": "6.3.3",
  "ts-jest": "29.1.0",
  "ts-loader": "9.4.3",
  "ts-node": "10.9.1",
  "tsconfig-paths": "4.2.0",
  "typescript": "5.1.3"
},

Gateway

"dependencies": {
  "@apollo/gateway": "2.4.8",
  "@apollo/server": "4.7.5",
  "@nestjs/apollo": "12.0.3",
  "@nestjs/common": "10.0.3",
  "@nestjs/core": "10.0.3",
  "@nestjs/graphql": "12.0.3",
  "@nestjs/platform-express": "10.0.3",
  "graphql": "16.6.0",
  "graphql-tools": "9.0.0",
  "reflect-metadata": "0.1.13",
  "rimraf": "5.0.1",
  "rxjs": "7.8.1",
  "ts-morph": "19.0.0"
},
"devDependencies": {
  "@nestjs/cli": "10.0.5",
  "@nestjs/schematics": "10.0.1",
  "@nestjs/testing": "10.0.3",
  "@types/express": "4.17.17",
  "@types/jest": "29.5.2",
  "@types/node": "20.3.2",
  "@types/supertest": "2.0.12",
  "@typescript-eslint/eslint-plugin": "5.60.0",
  "@typescript-eslint/parser": "5.60.0",
  "eslint": "8.43.0",
  "eslint-config-prettier": "8.8.0",
  "eslint-plugin-prettier": "4.2.1",
  "jest": "29.5.0",
  "prettier": "2.8.8",
  "supertest": "6.3.3",
  "ts-jest": "29.1.0",
  "ts-loader": "9.4.3",
  "ts-node": "10.9.1",
  "tsconfig-paths": "4.2.0",
  "typescript": "5.1.3",
  "webpack": "5.88.0"
},

Node.js version

20.2.0 (latest version i could install with nvm. @types/node package is specified as v20.3.2)

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

I did not change anything in the repository. Its just a clone of what is on github.

@NilsMoller NilsMoller added the needs triage This issue has not been looked into label Jun 29, 2023
@kamilmysliwiec
Copy link
Member

kamilmysliwiec commented Jun 30, 2023

@Tony133 I believe you recently created a PR to fix this example 🤔 (?). Perhaps dependabot/renovate did automatically upgrade dependencies again

@Tony133
Copy link
Contributor

Tony133 commented Jun 30, 2023

Yes, I had done this PR: #11880, from what I noticed, dependabot/renovate did automatically upgrade dependencies again. (see screenshot)
screen-renovate

@Tony133
Copy link
Contributor

Tony133 commented Jun 30, 2023

This and the PR of renovate that re-updated the dependencies: #11811

@kamilmysliwiec
Copy link
Member

kamilmysliwiec commented Jun 30, 2023

Would you like to create a PR for this again? @Tony133 I'll see if we can block renovate & dependabot for this sample 😞

@Tony133
Copy link
Contributor

Tony133 commented Jun 30, 2023

Yes, in the afternoon I will prepare the PR 🚀

@Tony133
Copy link
Contributor

Tony133 commented Jun 30, 2023

PR done! link: #11950 🔥 🚀

@kamilmysliwiec
Copy link
Member

Thank you @Tony133! Let's track this here #11950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

3 participants