Conversation
🦋 Changeset detectedLatest commit: f272177 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
📝 WalkthroughWalkthroughAdds a new Inversify-backed provider (interface, implementation, and DI symbol), registers it as a singleton in the Apollo container module with updated tests, widens the ApolloServer service identifier generic, updates the apollo-core export barrel, and consolidates .npmignore patterns across several packages. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Container as Inversify Container
participant Module as ApolloServerContainerModule
participant ProviderImpl as InversifyApolloProviderImplementation
participant Apollo as ApolloServer
participant HTTP as http.Server
Note over Module,Container: Module load registers bindings
Module->>Container: bind(apolloServerServiceIdentifier).to(...).inSingletonScope()
Module->>Container: bind(httpServerServiceIdentifier).to(...).inSingletonScope()
Module->>Container: bind(inversifyApolloProviderServiceIdentifier).to(ProviderImpl).inSingletonScope()
Note over Client,Container: Resolution at runtime
Client->>Container: get(inversifyApolloProviderServiceIdentifier)
Container->>ProviderImpl: instantiate (injects)
ProviderImpl->>Container: resolve(apolloServerServiceIdentifier) -> Apollo
ProviderImpl->>Container: resolve(httpServerServiceIdentifier) -> HTTP
ProviderImpl->>Client: return { apolloServer: Apollo, httpServer: HTTP }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (6)
packages/apollo-subscription-ws/.npmignore (1)
6-6: Consider removing redundantsrc/pattern from spec exclusion.Line 8 already excludes the entire
src/directory, making thesrc/**/*.spec.*portion of this pattern redundant. You can simplify to justlib/**/*.spec.{d.ts,d.ts.map,js,js.map}unless the intent is explicit clarity.packages/apollo-express/.npmignore (1)
6-6: Consider removing redundantsrc/pattern from spec exclusion.Line 8 already excludes the entire
src/directory, making thesrc/**/*.spec.*portion redundant. Simplify tolib/**/*.spec.{d.ts,d.ts.map,js,js.map}for clarity.packages/apollo-core/.npmignore (1)
6-6: Consider removing redundantsrc/pattern from spec exclusion.Line 8 already excludes the entire
src/directory, making thesrc/**/*.spec.*portion redundant. Simplify tolib/**/*.spec.{d.ts,d.ts.map,js,js.map}.packages/codegen/.npmignore (1)
6-6: Consider removing redundantsrc/pattern from spec exclusion.Line 8 already excludes the entire
src/directory, making thesrc/**/*.spec.*portion redundant. Simplify tolib/**/*.spec.{d.ts,d.ts.map,js,js.map}.packages/apollo-core/src/apollo/modules/InversifyApolloProvider.ts (1)
5-10: Consider adding JSDoc documentation.The interface is well-structured with appropriate readonly properties. Adding JSDoc comments would help consumers understand the purpose and usage of this provider interface.
🔎 Suggested documentation
+/** + * Provides access to initialized Apollo Server and HTTP Server instances. + * This interface is implemented by dependency injection to wire together + * the Apollo GraphQL server with its underlying HTTP transport. + */ export interface InversifyApolloProvider { // eslint-disable-next-line @typescript-eslint/no-explicit-any readonly apolloServer: ApolloServer<any>; readonly httpServer: http.Server; }packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts (1)
12-17: Consider adjusting ESLint disable comment placement.The class implementation correctly uses Inversify decorators and parameter properties. However, the ESLint disable comment on line 13 would be more conventionally placed directly before the type it applies to on line 14.
🔎 Suggested placement
constructor( - @inject(apolloServerServiceIdentifier) // eslint-disable-next-line @typescript-eslint/no-explicit-any - public readonly apolloServer: ApolloServer<any>, + @inject(apolloServerServiceIdentifier) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public readonly apolloServer: ApolloServer<any>, @inject(httpServerServiceIdentifier) public readonly httpServer: http.Server, ) {}
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
.changeset/open-otters-listen.mdpackages/apollo-core/.npmignorepackages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.tspackages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.tspackages/apollo-core/src/apollo/modules/InversifyApolloProvider.tspackages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.tspackages/apollo-core/src/index.tspackages/apollo-express/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/codegen/.npmignore
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use strict mode enabled for TypeScript across all packages
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProvider.tspackages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.tspackages/apollo-core/src/index.tspackages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with shared configuration from @inversifyjs/foundation-prettier-config
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProvider.tspackages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.tspackages/apollo-core/src/index.tspackages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use ESLint with shared configuration from @inversifyjs/foundation-eslint-config
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProvider.tspackages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.tspackages/apollo-core/src/index.tspackages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.tspackages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts
**/*.{spec,int.spec,spec-d}.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{spec,int.spec,spec-d}.ts: Use Vitest for unit and integration testing with extensive test coverage
Mock external modules using vitest.fn() and vitest.mock() in tests
Files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.ts
**/*.spec.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name unit tests with *.spec.ts file extension
Files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.ts
**/*.{spec,int.spec}.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{spec,int.spec}.ts: Organize test describe blocks in four-layer structure: Class → Method → Input → Flow scopes
Use descriptive test names with 'when called, and [condition]' pattern
Files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.ts
🧠 Learnings (11)
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec,spec-d}.ts : Mock external modules using vitest.fn() and vitest.mock() in tests
Applied to files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec,spec-d}.ts : Use Vitest for unit and integration testing with extensive test coverage
Applied to files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec}.ts : Organize test describe blocks in four-layer structure: Class → Method → Input → Flow scopes
Applied to files:
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.tspackages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-19T19:51:35.306Z
Learnt from: notaphplover
Repo: inversify/graphql PR: 6
File: packages/codegen/tsconfig.json:1-10
Timestamp: 2025-12-19T19:51:35.306Z
Learning: In the inversifyjs/graphql-codegen package (packages/codegen/), both tsconfig.json and tsconfig.esm.json exist intentionally, even though they may appear identical. This is part of the planned build strategy.
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.spec-d.ts : Name type tests with *.spec-d.ts file extension for TypeScript type checking tests
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.spec.ts : Name unit tests with *.spec.ts file extension
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.int.spec.ts : Name integration tests with *.int.spec.ts file extension
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/tsconfig*.json : Configure TypeScript with multiple tsconfig files for different output formats (ESM and CommonJS)
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use ESLint with shared configuration from inversifyjs/foundation-eslint-config
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{ts,tsx} : Use strict mode enabled for TypeScript across all packages
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{ts,tsx,js,jsx,json,md} : Use Prettier with shared configuration from inversifyjs/foundation-prettier-config
Applied to files:
packages/codegen/.npmignorepackages/apollo-subscription-ws/.npmignorepackages/apollo-express/.npmignorepackages/apollo-core/.npmignore
🧬 Code graph analysis (5)
packages/apollo-core/src/apollo/modules/InversifyApolloProvider.ts (1)
packages/apollo-core/src/index.ts (1)
InversifyApolloProvider(11-11)
packages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.ts (1)
packages/apollo-core/src/index.ts (1)
apolloServerServiceIdentifier(6-6)
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts (3)
packages/apollo-core/src/apollo/modules/InversifyApolloProvider.ts (1)
InversifyApolloProvider(5-10)packages/apollo-core/src/index.ts (2)
InversifyApolloProvider(11-11)apolloServerServiceIdentifier(6-6)packages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.ts (1)
apolloServerServiceIdentifier(4-7)
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.ts (2)
packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts (1)
inversifyApolloProviderServiceIdentifier(5-6)packages/apollo-core/src/index.ts (1)
inversifyApolloProviderServiceIdentifier(8-8)
packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts (2)
packages/apollo-core/src/index.ts (2)
inversifyApolloProviderServiceIdentifier(8-8)InversifyApolloProvider(11-11)packages/apollo-core/src/apollo/modules/InversifyApolloProvider.ts (1)
InversifyApolloProvider(5-10)
🔇 Additional comments (11)
.changeset/open-otters-listen.md (1)
1-6: LGTM!The changeset correctly documents the additions and the minor version bump is appropriate for these new public exports.
packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.ts (2)
12-13: LGTM!The imports are correctly formatted with proper relative paths and
.jsextensions.
59-62: LGTM!The binding follows the correct pattern for class-based DI and appropriately uses singleton scope for the provider.
packages/apollo-core/src/index.ts (1)
8-11: LGTM!The exports are correctly structured with value export for the service identifier and type-only export for the interface. The blank line separation improves readability.
packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts (1)
5-6: LGTM!The service identifier follows the established pattern and correctly uses
Symbol.for()with appropriate typing.packages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.ts (1)
4-7: LGTM!The type widening to
ApolloServer<any>is appropriate and necessary for compatibility with the newInversifyApolloProviderinterface. The use ofanyfor Apollo's context type is pragmatic given that the context type is user-defined.packages/apollo-core/src/apollo/modules/ApolloServerContainerModule.spec.ts (5)
19-19: LGTM!The import is correctly added with proper file extension.
41-50: LGTM!The mock setup correctly extends the fluent syntax mock to include the
tomethod withmockReturnThis()for proper method chaining.
70-79: LGTM!The test correctly verifies that the new
inversifyApolloProviderServiceIdentifierbinding is registered, with the bind call count properly updated from 2 to 3.
105-110: LGTM!The new test case properly verifies that
bind.to()is called once with a function (theInversifyApolloProviderImplementationclass constructor), following the established test patterns.Based on learnings, the test structure follows the recommended four-layer organization and uses Vitest correctly.
112-119: LGTM!The singleton scope call count is correctly updated from 2 to 3 to reflect the additional binding.
packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts
Outdated
Show resolved
Hide resolved
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts (1)
12-17: LGTM!The constructor correctly implements dependency injection using Inversify's
@injectdecorators. The use ofpublic readonlyparameter shorthand is idiomatic TypeScript, and the implementation properly matches theInversifyApolloProviderinterface.💡 Optional: Consider repositioning the ESLint disable comment
The ESLint disable comment on line 13 is functional but appears after the decorator on the same line. A more conventional placement would be on its own line:
constructor( + // eslint-disable-next-line @typescript-eslint/no-explicit-any @inject(apolloServerServiceIdentifier) - // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly apolloServer: ApolloServer<any>, @inject(httpServerServiceIdentifier) public readonly httpServer: http.Server, ) {}This improves readability by separating concerns, though the current format works correctly.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.tspackages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/apollo-core/src/apollo/models/inversifyApolloProviderServiceIdentifier.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use strict mode enabled for TypeScript across all packages
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with shared configuration from @inversifyjs/foundation-prettier-config
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use ESLint with shared configuration from @inversifyjs/foundation-eslint-config
Files:
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
🧠 Learnings (1)
📚 Learning: 2025-12-19T19:51:35.306Z
Learnt from: notaphplover
Repo: inversify/graphql PR: 6
File: packages/codegen/tsconfig.json:1-10
Timestamp: 2025-12-19T19:51:35.306Z
Learning: In the inversifyjs/graphql-codegen package (packages/codegen/), both tsconfig.json and tsconfig.esm.json exist intentionally, even though they may appear identical. This is part of the planned build strategy.
Applied to files:
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts
🧬 Code graph analysis (1)
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts (3)
packages/apollo-core/src/index.ts (2)
InversifyApolloProvider(11-11)apolloServerServiceIdentifier(6-6)packages/apollo-core/src/apollo/modules/InversifyApolloProvider.ts (1)
InversifyApolloProvider(5-10)packages/apollo-core/src/apollo/models/apolloServerServiceIdentifier.ts (1)
apolloServerServiceIdentifier(4-7)
🔇 Additional comments (2)
packages/apollo-core/src/apollo/modules/InversifyApolloProviderImplementation.ts (2)
6-8: Previous critical issue resolved.The
.jsextensions are now correctly included in all relative imports, ensuring proper ESM module resolution. This addresses the previous critical review comment.
10-11: LGTM!The class declaration correctly uses the
@injectable()decorator and implements theInversifyApolloProviderinterface, following standard Inversify DI patterns.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts (2)
153-160: Consider verifying alltoResolvedValue()calls.The change from nth-call assertions to direct
toHaveBeenCalledWithchecks improves test resilience. However, the test verifies only 2 out of 4toResolvedValue()calls. If the other 2 calls are also critical bindings, consider adding explicit assertions for them.If all 4 calls should be verified, consider adding assertions for the remaining calls:
// Existing assertions expect(bindToFluentSyntaxMock.toResolvedValue).toHaveBeenCalledWith( expect.any(Function), [httpApplicationServiceIdentifier], ); expect(bindToFluentSyntaxMock.toResolvedValue).toHaveBeenCalledWith( expect.any(Function), [httpServerServiceIdentifier], ); // Add assertions for the other 2 calls if they're significant // For example, if one is for the new InversifyApolloProvider: expect(bindToFluentSyntaxMock.toResolvedValue).toHaveBeenCalledWith( expect.any(Function), [/* appropriate service identifier */], );
77-77: Optional: Consider more formal test naming.The test name 'when called load()' works but could be slightly more formal. Per coding guidelines, consider: 'when called, and load() is invoked' or simply 'when load() is called'.
As per coding guidelines, use the 'when called, and [condition]' pattern more formally:
- describe('when called load()', () => { + describe('when load() is called', () => {
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use strict mode enabled for TypeScript across all packages
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
**/*.{spec,int.spec,spec-d}.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{spec,int.spec,spec-d}.ts: Use Vitest for unit and integration testing with extensive test coverage
Mock external modules using vitest.fn() and vitest.mock() in tests
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
**/*.spec.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name unit tests with *.spec.ts file extension
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
**/*.{spec,int.spec}.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{spec,int.spec}.ts: Organize test describe blocks in four-layer structure: Class → Method → Input → Flow scopes
Use descriptive test names with 'when called, and [condition]' pattern
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with shared configuration from @inversifyjs/foundation-prettier-config
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use ESLint with shared configuration from @inversifyjs/foundation-eslint-config
Files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
🧠 Learnings (3)
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec,spec-d}.ts : Mock external modules using vitest.fn() and vitest.mock() in tests
Applied to files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec,spec-d}.ts : Use Vitest for unit and integration testing with extensive test coverage
Applied to files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
📚 Learning: 2025-12-24T10:31:07.649Z
Learnt from: CR
Repo: inversify/graphql PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-24T10:31:07.649Z
Learning: Applies to **/*.{spec,int.spec}.ts : Organize test describe blocks in four-layer structure: Class → Method → Input → Flow scopes
Applied to files:
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts
🧬 Code graph analysis (1)
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts (1)
packages/apollo-core/src/apollo/models/apolloServerPluginsServiceIdentifier.ts (1)
apolloServerPluginsServiceIdentifier(4-7)
🔇 Additional comments (3)
packages/apollo-express/src/apollo/modules/ApolloExpressServerContainerModule.spec.ts (3)
80-80: LGTM: Mock extended to support.to()binding.The addition of the
tomock property correctly extends the fluent binding interface to support the.to()method, which is part of Inversify's binding API. ThemockReturnThis()implementation is appropriate for fluent chaining.Also applies to: 97-97
179-179: LGTM: Singleton scope count updated correctly.The increase from 5 to 6
inSingletonScope()calls correctly reflects the additional singleton binding in the container module.
124-144: The test is correct;inversifyApolloProviderServiceIdentifieris bound in the parent class, not in this module.The
inversifyApolloProviderServiceIdentifierbinding is defined in the parent classApolloServerContainerModule(inpackages/apollo-core), not inApolloExpressServerContainerModule. The parent class test verifies this binding explicitly. The child class test correctly expects 8 totalbind()calls (3 from parent + 5 from this module) and properly verifies all 5 bindings specific to this module at positions 4–8. No additional assertions are needed.Likely an incorrect or invalid review comment.
Added
InversifyApolloProvider.inversifyApolloProviderServiceIdentifier.Changed
ApoloServerContainerModuleto bindinversifyApolloProviderServiceIdentifier.Summary by CodeRabbit
New Features
Public API
Chores
✏️ Tip: You can customize this high-level summary in your review settings.