Skip to content

Conversation

@k-i-k-s
Copy link

@k-i-k-s k-i-k-s commented Oct 28, 2025

Summary of Main Changes and Their Purpose

  1. TypeScript Module Update (index.d.ts):

    • The module declaration for apollo-datasource-mongodb has been updated to include new options such as lean, disableMemoize, and keyPrefix. This allows for more flexibility in configuring the data source.
  2. Package Version Updates (package.json):

    • Various dependencies (e.g., Babel, Jest, MongoDB, Mongoose) have been updated to their latest versions to ensure compatibility and performance improvements.
  3. Test Enhancements:

    • Several test files (cache.test.js, datasource.test.js) have been enhanced to include more comprehensive testing scenarios.
    • The tests now cover additional edge cases such as handling lean option, caching with a key prefix, and disabling memoization.
  4. Cache Implementation Updates (cache.js):

    • The createCachingMethods function has been updated to handle the new options (lean, disableMemoize, keyPrefix). It now properly configures the DataLoader and cache behavior based on these options.
    • Enhanced logging for better debugging.
  5. Data Source Class Updates (datasource.js):

    • The MongoDataSource constructor now accepts an additional options parameter, allowing it to pass options to the createCachingMethods.
  6. Helper Function Updates (helpers.js):

    • The DEBUG flag is now conditionally set based on environment variables (NODE_ENV and __DEBUG). This allows for more granular control over debugging behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant