Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphql/dataloader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: graphql/dataloader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jun 12, 2022

  1. fix: incorrect variable name in README.md (#313)

    Corrected variable name from `identityLoader` to `myLoader`
    danielcaballero authored Jun 12, 2022
    Copy the full SHA
    a80c5ff View commit details

Commits on Jul 4, 2022

  1. fix: add typings and test for priming with promise (#252)

    * Add typings and test for priming with promise
    
    * add changeset
    
    Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com>
    LinusU and saihaj authored Jul 4, 2022
    Copy the full SHA
    fae38f1 View commit details

Commits on Aug 19, 2022

  1. ci: update changeset

    saihaj committed Aug 19, 2022
    Copy the full SHA
    b2333e9 View commit details

Commits on Sep 5, 2022

  1. Copy the full SHA
    015a94c View commit details

Commits on Dec 5, 2022

  1. Copy the full SHA
    26136b0 View commit details

Commits on Dec 6, 2022

  1. fix: maxBatchSize parameter was not being sent to loader (#321)

    * Fixes #294.
    
    * Added changeset for fix.
    thekevinbrown authored Dec 6, 2022
    Copy the full SHA
    3cd3a43 View commit details

Commits on Dec 8, 2022

  1. Bump qs from 6.5.2 to 6.5.3 (#323)

    Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
    - [Release notes](https://github.com/ljharb/qs/releases)
    - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
    - [Commits](ljharb/qs@v6.5.2...v6.5.3)
    
    ---
    updated-dependencies:
    - dependency-name: qs
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 8, 2022
    Copy the full SHA
    7eb6424 View commit details
  2. Bump decode-uri-component from 0.2.0 to 0.2.2 (#320)

    Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
    - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
    - [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: decode-uri-component
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 8, 2022
    Copy the full SHA
    420573b View commit details

Commits on Jan 13, 2023

  1. fix: propagate batchFn sync throws to the loader instead of crashing (#…

    …318)
    
    * fix: propagate batchFn sync throws to the loader instead of crashing
    
    * add changeset
    boopathi authored Jan 13, 2023
    Copy the full SHA
    588a8b6 View commit details

Commits on Jan 22, 2023

  1. feat: add name to DataLoader (#326)

    SimenB authored Jan 22, 2023
    Copy the full SHA
    6c758d0 View commit details

Commits on Jan 30, 2023

  1. Copy the full SHA
    76f2d09 View commit details
  2. Update tested node version (#329)

    Node 12 is end-of-life so I propose to drop it from tests.
    
    Node 18 should be added as the LTS version, and.
    
    Node 19 should replace Node 17 as the current version.
    
    Co-authored-by: Oskari Porkka <oporkka@users.noreply.github.com>
    oporkka and oporkka authored Jan 30, 2023
    Copy the full SHA
    c163aa9 View commit details

Commits on Feb 2, 2023

  1. Copy the full SHA
    ff69d98 View commit details
  2. remove unused supress comment

    saihaj committed Feb 2, 2023
    Copy the full SHA
    a5261db View commit details
  3. Copy the full SHA
    dfb9d93 View commit details
  4. chore: release v2.2.0

    saihaj committed Feb 2, 2023
    Copy the full SHA
    afa3cb3 View commit details
  5. fix: TS types for the new name property (#331)

    * fix: TS types for the new name property
    
    * optional
    
    * Revert "optional"
    
    This reverts commit a012ca7.
    saihaj authored Feb 2, 2023
    Copy the full SHA
    6d2efb7 View commit details
  6. chore: release v2.2.1

    saihaj committed Feb 2, 2023
    Copy the full SHA
    0a09c56 View commit details

Commits on Feb 10, 2023

  1. fix: expose name in Dataloader instance types (#334)

    * fix: expose name on Dataloader instance
    
    * docs: add changeset
    henrinormak authored Feb 10, 2023
    Copy the full SHA
    e286f66 View commit details

Commits on Feb 13, 2023

  1. chore: v2.2.2

    saihaj committed Feb 13, 2023
    Copy the full SHA
    9c0b6b0 View commit details

Commits on Mar 6, 2023

  1. Copy the full SHA
    d87332a View commit details
  2. Bump json5 from 2.1.1 to 2.2.3 (#325)

    Bumps [json5](https://github.com/json5/json5) from 2.1.1 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](json5/json5@v2.1.1...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 6, 2023
    Copy the full SHA
    cfa6225 View commit details
  3. Bump minimatch from 3.0.4 to 3.1.2 (#324)

    Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
    - [Release notes](https://github.com/isaacs/minimatch/releases)
    - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
    - [Commits](isaacs/minimatch@v3.0.4...v3.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: minimatch
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 6, 2023
    Copy the full SHA
    d336bd1 View commit details

Commits on Nov 17, 2023

  1. Fix correct path of function when click on mobile links (#351)

    * change master to main branch
    
    * Update README.md
    adamward459 authored Nov 17, 2023
    Copy the full SHA
    55c33d4 View commit details

Commits on Feb 11, 2024

  1. Copy the full SHA
    003c045 View commit details

Commits on Jul 11, 2024

  1. Copy the full SHA
    18da9f3 View commit details
  2. perf: call cacheKeyFn only when it is needed (if caching) (#342)

    * perf: call and reuse cacheKeyFn only when it is needed (if caching)
    
    * test: add a test case for cacheKeyFn not being called
    
    * chore: fix flow error
    
    * docs: add changeset
    abendi authored Jul 11, 2024
    Copy the full SHA
    38fedd4 View commit details

Commits on Aug 27, 2024

  1. Copy the full SHA
    77c2cd7 View commit details

Commits on Dec 3, 2024

  1. Bump word-wrap from 1.2.3 to 1.2.4 (#345)

    Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
    - [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
    - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)
    
    ---
    updated-dependencies:
    - dependency-name: word-wrap
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 3, 2024
    Copy the full SHA
    f8cfc4d View commit details
  2. Copy the full SHA
    f65532e View commit details
  3. Copy the full SHA
    35729a6 View commit details
  4. Copy the full SHA
    5e851ce View commit details
  5. releas 2.2.3

    saihaj committed Dec 3, 2024
    Copy the full SHA
    9eda294 View commit details
  6. remove generated filed

    saihaj committed Dec 3, 2024
    Copy the full SHA
    4d916a3 View commit details
  7. Copy the full SHA
    a107730 View commit details
9 changes: 6 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "graphql/dataloader" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
flow-typed/
18 changes: 5 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -5,28 +5,24 @@

"parser": "babel-eslint",

"plugins": ["prettier"],

"env": {
"es6": true,
"node": true,
"jest": true
},

"rules": {
"array-bracket-spacing": [2, "always"],
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"block-scoped-var": 0,
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"callback-return": 2,
"camelcase": [2, {"properties": "always"}],
"comma-dangle": 0,
"comma-spacing": 0,
"comma-style": [2, "last"],
"complexity": 0,
"computed-property-spacing": [2, "never"],
"consistent-return": 0,
"consistent-this": 0,
"curly": [2, "all"],
"default-case": 0,
"dot-location": [2, "property"],
"dot-notation": 0,
@@ -39,14 +35,12 @@
"handle-callback-err": [2, "error"],
"id-length": 0,
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
"indent": [2, 2, {"SwitchCase": 1}],
"init-declarations": 0,
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": 2,
"linebreak-style": 2,
"lines-around-comment": 0,
"max-depth": 0,
"max-len": [2, 80, 4],
"max-nested-callbacks": 0,
"max-params": 0,
"max-statements": 0,
@@ -155,16 +149,12 @@
"object-shorthand": [2, "always"],
"one-var": [2, "never"],
"operator-assignment": [2, "always"],
"operator-linebreak": [2, "after"],
"padded-blocks": 0,
"prefer-const": 0,
"prefer-reflect": 0,
"prefer-spread": 0,
"quote-props": [2, "as-needed"],
"quotes": [2, "single"],
"radix": 2,
"require-yield": 2,
"semi": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"sort-vars": 0,
"space-before-blocks": [2, "always"],
@@ -180,6 +170,8 @@
"vars-on-top": 0,
"wrap-iife": 2,
"wrap-regex": 0,
"yoda": [2, "never", {"exceptRange": true}]
"yoda": [2, "never", {"exceptRange": true}],

"prettier/prettier": 2
}
}
39 changes: 0 additions & 39 deletions .github/workflows/release.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -8,18 +8,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 14, 16, 17]
node-version: [18, 20, 22]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@master
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
uses: c-hive/gha-yarn-cache@v2
cache: 'yarn'

- name: Install Dependencies using Yarn
run: yarn --ignore-engines
@@ -28,6 +26,8 @@ jobs:
run: yarn test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -9,3 +9,8 @@ npm-debug.log
node_modules
coverage
dist

# Generated with release scripts
index.d.ts
index.js
index.js.flow
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# dataloader

## 2.2.3

### Patch Changes

- [#342](https://github.com/graphql/dataloader/pull/342) [`38fedd4`](https://github.com/graphql/dataloader/commit/38fedd4106e9e3e7eb77bd68e42abc088110bd43) Thanks [@abendi](https://github.com/abendi)! - Ensure `cacheKeyFn` is not called when caching is disabled, since the key is not utilized in that case.

## 2.2.2

### Patch Changes

- [#334](https://github.com/graphql/dataloader/pull/334) [`e286f66`](https://github.com/graphql/dataloader/commit/e286f662657675fa790f33abcd6aa87b5aac2be3) Thanks [@henrinormak](https://github.com/henrinormak)! - Added missing type definition for Dataloader.name

## 2.2.1

### Patch Changes

- [#331](https://github.com/graphql/dataloader/pull/331) [`6d2efb7`](https://github.com/graphql/dataloader/commit/6d2efb7dd0363062de255e723c29a781d0ea9937) Thanks [@saihaj](https://github.com/saihaj)! - `name` is an optional property

## 2.2.0

### Minor Changes

- [#326](https://github.com/graphql/dataloader/pull/326) [`6c758d0`](https://github.com/graphql/dataloader/commit/6c758d03bef628a69b238f053da3b263cd5e3321) Thanks [@SimenB](https://github.com/SimenB)! - Add `name` property to `DataLoader`. Useful in APM tools.

### Patch Changes

- [#318](https://github.com/graphql/dataloader/pull/318) [`588a8b6`](https://github.com/graphql/dataloader/commit/588a8b6c6391aad042b369f10dc440c7e0458312) Thanks [@boopathi](https://github.com/boopathi)! - Fix the propagation of sync throws in the batch function to the loader function instead of crashing the process wtih an uncaught exception.

* [#252](https://github.com/graphql/dataloader/pull/252) [`fae38f1`](https://github.com/graphql/dataloader/commit/fae38f14702e925d1e59051d7e5cb3a9a78bfde8) Thanks [@LinusU](https://github.com/LinusU)! - Fix types for priming cache with promise

- [#321](https://github.com/graphql/dataloader/pull/321) [`3cd3a43`](https://github.com/graphql/dataloader/commit/3cd3a430bdb4f9ef2f7f265a29e93e0255277885) Thanks [@thekevinbrown](https://github.com/thekevinbrown)! - Resolves an issue where the maxBatchSize parameter wouldn't be fully used on each batch sent to the backend loader.

## 2.1.0

### Minor Changes
15 changes: 12 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ We want to make contributing to this project as easy and transparent as
possible.

## Code of Conduct

This project's code of conduct is described in the GraphQL Foundation's [`CODE_OF_CONDUCT.md`](https://github.com/graphql/foundation/blob/master/CODE-OF-CONDUCT.md)

## Pull Requests
@@ -16,6 +17,14 @@ We actively welcome your pull requests for documentation and code.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").
7. Run `yarn changeset` and describe the change you're proposing. Commit the file it creates in `.changeset` to the repo. [You can read more about changeset here.](https://github.com/changesets/changesets)
8. Open a Pull Request so we can review and incorporate your change.

## Releases

To release a new version:
1. Run `yarn changeset version` to bump the version of the package.
2. Run `yarn release` this will create a new release on GitHub and publish the package to NPM.

## Issues

@@ -24,9 +33,9 @@ clear and has sufficient instructions to be able to reproduce the issue.

## Coding Style

* 2 spaces for indentation rather than tabs
* 80 character line length
* See .eslintrc for the gory details.
- 2 spaces for indentation rather than tabs
- 80 character line length
- See .eslintrc for the gory details.

## License

Loading