data-client

Async State Management without the Management

APACHE-2.0 License

Downloads
44.4K
Stars
1.9K
Committers
37

Bot releases are visible (Hide)

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • Updated dependencies [318df89bf7]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • Updated dependencies [318df89bf7]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • 1fcaeb1a7b: Fix some versions of RN not working with Collections

    (Array.sort() does not exist in all versions)

  • Updated dependencies [318df89bf7]

  • Updated dependencies [1fcaeb1a7b]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • Updated dependencies [318df89bf7]

  • Updated dependencies [1fcaeb1a7b]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • Updated dependencies [318df89bf7]

  • Updated dependencies [1fcaeb1a7b]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 318df89bf7: Add nonFilterArgumentKeys argument to Collection

    nonFilterArgumentKeys defines a test to determine which argument keys
    are not used for filtering the results. For instance, if your API uses
    'orderBy' to choose a sort - this argument would not influence which
    entities are included in the response.

    This allows customizing createCollectionFilter for the
    most common case

  • 1fcaeb1a7b: Fix some versions of RN not working with Collections

    (Array.sort() does not exist in all versions)

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 4317adb94c: Collection based pagination now replaces the non-list members on page

    This allows members like nextPage or 'cursor' to be updated when
    each page is fetched making it easier to know which page to fetch next.

  • a097d25e7a: controller.fetchIfStale() resolves to data from store if it does not fetch

  • Updated dependencies [4317adb94c]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 4317adb94c: Collections with arguments in different orders now correctly mean the same Collection

    This could sometimes result in different instances of a Collection having different values.

  • Updated dependencies [5a16f86668]

  • Updated dependencies [4317adb94c]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • a097d25e7a: controller.fetchIfStale() resolves to data from store if it does not fetch
data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • a097d25e7a: controller.fetchIfStale() resolves to data from store if it does not fetch
  • Updated dependencies [a097d25e7a]
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 4317adb94c: Collection based pagination now replaces the non-list members on page

    This allows members like nextPage or 'cursor' to be updated when
    each page is fetched making it easier to know which page to fetch next.

  • Updated dependencies [5a16f86668]

  • Updated dependencies [4317adb94c]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 5a16f86668: Allowing Collection class override for createCollectionFilter default

  • 4317adb94c: Collections with arguments in different orders now correctly mean the same Collection

    This could sometimes result in different instances of a Collection having different values.

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • a097d25e7a: controller.fetchIfStale() resolves to data from store if it does not fetch
  • Updated dependencies [a097d25e7a]
data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 5cedd4485e: Add controller.fetchIfStale()

    Fetches only if endpoint is considered 'stale'; otherwise returns undefined.

    This can be useful when prefetching data, as it avoids overfetching fresh data.

    An example with a fetch-as-you-render router:

    {
      name: 'IssueList',
      component: lazyPage('IssuesPage'),
      title: 'issue list',
      resolveData: async (
        controller: Controller,
        { owner, repo }: { owner: string; repo: string },
        searchParams: URLSearchParams,
      ) => {
        const q = searchParams?.get('q') || 'is:issue is:open';
        await controller.fetchIfStale(IssueResource.search, {
          owner,
          repo,
          q,
        });
      },
    },
    

Patch Changes

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 5cedd4485e: Add controller.fetchIfStale()

    Fetches only if endpoint is considered 'stale'; otherwise returns undefined.

    This can be useful when prefetching data, as it avoids overfetching fresh data.

    An example with a fetch-as-you-render router:

    {
      name: 'IssueList',
      component: lazyPage('IssuesPage'),
      title: 'issue list',
      resolveData: async (
        controller: Controller,
        { owner, repo }: { owner: string; repo: string },
        searchParams: URLSearchParams,
      ) => {
        const q = searchParams?.get('q') || 'is:issue is:open';
        await controller.fetchIfStale(IssueResource.search, {
          owner,
          repo,
          q,
        });
      },
    },
    

Patch Changes

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 5cedd4485e: Add controller.fetchIfStale()

    Fetches only if endpoint is considered 'stale'; otherwise returns undefined.

    This can be useful when prefetching data, as it avoids overfetching fresh data.

    An example with a fetch-as-you-render router:

    {
      name: 'IssueList',
      component: lazyPage('IssuesPage'),
      title: 'issue list',
      resolveData: async (
        controller: Controller,
        { owner, repo }: { owner: string; repo: string },
        searchParams: URLSearchParams,
      ) => {
        const q = searchParams?.get('q') || 'is:issue is:open';
        await controller.fetchIfStale(IssueResource.search, {
          owner,
          repo,
          q,
        });
      },
    },
    

Patch Changes

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 5cedd4485e: Add controller.fetchIfStale()

    Fetches only if endpoint is considered 'stale'; otherwise returns undefined.

    This can be useful when prefetching data, as it avoids overfetching fresh data.

    An example with a fetch-as-you-render router:

    {
      name: 'IssueList',
      component: lazyPage('IssuesPage'),
      title: 'issue list',
      resolveData: async (
        controller: Controller,
        { owner, repo }: { owner: string; repo: string },
        searchParams: URLSearchParams,
      ) => {
        const q = searchParams?.get('q') || 'is:issue is:open';
        await controller.fetchIfStale(IssueResource.search, {
          owner,
          repo,
          q,
        });
      },
    },