question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An issue with the Apollo Federation dependency.

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Well, I don’t know if I should be bugging Apollo or you guys, but all of a sudden I got this error -

The "@apollo/federation/dist/directives" package is missing. Please, make sure to install this library ($ npm install @apollo/federation/dist/directives) to take advantage of SchemaBuilder

I tried re-installing node_modules, checking for newer versions. I haven’t check older versions, but I haven’t updated for at least a week, so it’s a weird problem.

I suspect either some change happened to your Graphql module or apollo changed something.

@nestjs/graphql”: “^9.0.5”

It could be a yarn workspace issue as well, so many edge cases.

Minimum reproduction code

https://github.com/OGNeutron/TheLastHurrah/tree/master/packages/the-last-hurrah-commence

Steps to reproduce

No response

Expected behavior

Well, I install it and it works. 👍

Package

Other package

@nestjs/graphql

NestJS version

8.0.10

Packages versions

“dependencies”: { “@casl/ability”: “^5.4.3”, “@casl/prisma”: “^1.0.0”, “@nestjs/axios”: “^0.0.2”, “@nestjs/common”: “^8.0.10”, “@nestjs/config”: “^1.0.2”, “@nestjs/core”: “^8.0.10”, “@nestjs/graphql”: “^9.0.5”, “@nestjs/jwt”: “^8.0.0”, “@nestjs/microservices”: “^8.0.10”, “@nestjs/passport”: “^8.0.1”, “@nestjs/platform-express”: “^8.0.10”, “@nestjs/throttler”: “^2.0.0”, “@nestjs/typeorm”: “^8.0.2”, “@prisma/client”: “^3.2.1”, “@thelasthurrah/the-last-hurrah-shared”: “^0.0.5”, “apollo-server-cache-redis”: “^3.1.0”, “apollo-server-express”: “^3.3.0”, “axios”: “^0.22.0”, “class-validator”: “^0.13.1”, “cross-env”: “^7.0.3”, “graphql”: “^15.6.1”, “graphql-type-json”: “^0.3.2”, “helmet”: “^4.6.0”, “ioredis”: “^4.27.10”, “joi”: “^17.4.2”, “passport”: “^0.5.0”, “passport-jwt”: “^4.0.0”, “passport-local”: “^1.0.0”, “pg”: “^8.7.1”, “reflect-metadata”: “^0.1.13”, “rimraf”: “^3.0.2”, “rxjs”: “^7.2.0”, “ts-morph”: “^12.0.0”, “typeorm”: “^0.2.37”, “yup”: “^0.32.9” }, “devDependencies”: { “@nestjs/cli”: “^8.1.2”, “@nestjs/schematics”: “^8.0.0”, “@nestjs/testing”: “^8.0.10”, “@types/express”: “^4.17.13”, “@types/jest”: “^27.0.1”, “@types/node”: “^16.10.2”, “@types/passport-jwt”: “^3.0.6”, “@types/passport-local”: “^1.0.34”, “@types/supertest”: “^2.0.11”, “@typescript-eslint/eslint-plugin”: “^4.33.0”, “@typescript-eslint/parser”: “^4.33.0”, “eslint”: “^7.30.0”, “eslint-config-prettier”: “^8.3.0”, “eslint-plugin-prettier”: “^4.0.0”, “jest”: “^27.2.4”, “prettier”: “^2.3.2”, “prisma”: “^3.2.0”, “supertest”: “^6.1.3”, “ts-jest”: “^27.0.3”, “ts-loader”: “^9.2.3”, “ts-node”: “^10.0.0”, “tsconfig-paths”: “^3.10.1”, “typescript”: “^4.3.5” },

Node.js version

16.8.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kamilmysliwieccommented, Oct 8, 2021

Just make sure to use 0.33.0 instead of 0.33.1 and you should be fine.

1reaction
kamilmysliwieccommented, Oct 18, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Federated schema checks - Apollo GraphQL Docs
Whenever you make changes to a subgraph schema, running rover subgraph check helps ensure that all your subgraph schemas still compose to a...
Read more >
fix(subgraph): Remove dependency on apollo-graphql #1134
Successfully merging a pull request may close this issue. remove dependency on apollo-graphql and port over functions apollographql/federation.
Read more >
Federation | NestJS - A progressive Node.js framework
Federation. Federation offers a means of splitting your monolithic GraphQL server into independent microservices. It consists of two components: a gateway ...
Read more >
Apollo Federation | GraphQL Kotlin
Migrating towards federated model with an API gateway and a number of smaller GraphQL services behind it alleviates some of those problems and ......
Read more >
The what, when, why, and how of federated GraphQL
With the introduction of Apollo Federation, the model for building ... thanks to less dependency and coupling between the different services ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found