apollographql / apollographql/apollo-tooling
apollo-tools should list graphql as a peer dependency (cannot find module)
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
I'm currently maintaining a typescript monorepo using pnpm as the workspace package manager and I have a couple of apps that depend on different versions of `graphql`. One of these apps (packageA) depends transitively on `@apollographql/apollo-tools` (via `@nestjs/graphql`), and due to the complex (yet sane) way pnpm builds the node_modules structure for monorepos, I am getting a `Cannot find module 'graphql'` from `monorepo/node_modules/.pnpm/@apollographql/apollo-tools@0.4.8/node_modules/@apollographql/apollo-tools/lib/utilities/graphql.js`.
I believe I've narrowed this down to this package not specifying `graphql` at least as a peer dependency, so pnpm is not guaranteeing its availability when importing from that location.
Contributor guide
Research direction
Start by inspecting the dependency declarations for @apollographql/apollo-tools and the failing import in lib/utilities/graphql.js. Reproduce the pnpm monorepo installation described in the issue, then verify that graphql is resolvable from that package location and that the package metadata reflects the required relationship.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100