Skip to content

Releases: reactive/data-client

@data-client/[email protected]

12 Mar 17:52
69ae187
Compare
Choose a tag to compare

Patch Changes

  • #3417 a6af54c Thanks @ntucker! - Update getOptimisticResponse snapshot types to include getResponseMeta

  • #3407 d84899d Thanks @ntucker! - Support dynamic invalidation/deletes

    Returning undefined from Entity.process
    will cause the Entity to be invalidated.
    This this allows us to invalidate dynamically; based on the particular response data.

    class PriceLevel extends Entity {
      price = 0;
      amount = 0;
    
      pk() {
        return this.price;
      }
    
      static process(
        input: [number, number],
        parent: any,
        key: string | undefined,
      ): any {
        const [price, amount] = input;
        if (amount === 0) return undefined;
        return { price, amount };
      }
    }
  • Updated dependencies [a6af54c, d84899d]:

@data-client/[email protected]

12 Mar 17:52
69ae187
Compare
Choose a tag to compare

Patch Changes

  • #3398 d716159 Thanks @ntucker! - Use controller.getResponseMeta() in hooks

    No behavior change, just anticipating API updates to controller

  • d6eab29 Thanks @ntucker! - docs: Add links to platforms

@data-client/[email protected]

12 Mar 17:52
69ae187
Compare
Choose a tag to compare

Patch Changes

  • #3417 a6af54c Thanks @ntucker! - Update getOptimisticResponse snapshot types to include getResponseMeta

  • #3407 d84899d Thanks @ntucker! - Support dynamic invalidation/deletes

    Returning undefined from Entity.process
    will cause the Entity to be invalidated.
    This this allows us to invalidate dynamically; based on the particular response data.

    class PriceLevel extends Entity {
      price = 0;
      amount = 0;
    
      pk() {
        return this.price;
      }
    
      static process(
        input: [number, number],
        parent: any,
        key: string | undefined,
      ): any {
        const [price, amount] = input;
        if (amount === 0) return undefined;
        return { price, amount };
      }
    }
  • Updated dependencies [a6af54c, d84899d]:

@data-client/[email protected]

12 Mar 17:52
69ae187
Compare
Choose a tag to compare

Patch Changes

  • #3417 a6af54c Thanks @ntucker! - Update getOptimisticResponse snapshot types to include getResponseMeta

  • #3407 d84899d Thanks @ntucker! - Support dynamic invalidation/deletes

    Returning undefined from Entity.process
    will cause the Entity to be invalidated.
    This this allows us to invalidate dynamically; based on the particular response data.

    class PriceLevel extends Entity {
      price = 0;
      amount = 0;
    
      pk() {
        return this.price;
      }
    
      static process(
        input: [number, number],
        parent: any,
        key: string | undefined,
      ): any {
        const [price, amount] = input;
        if (amount === 0) return undefined;
        return { price, amount };
      }
    }

@data-client/[email protected]

01 Mar 13:57
56d8beb
Compare
Choose a tag to compare

Patch Changes

  • #3390 32cccdb Thanks @ntucker! - Improve performance by using Map() instead of Object for unbounded keys

  • #3390 32cccdb Thanks @ntucker! - Interceptors that have args specified will still work, and warn about args.

    Example:

    {
      endpoint: TodoResource.getList.push,
      args: [{ userId: '5' }, {}],
      response({ userId }, body) {
        return { id: Math.random(), userId, ...ensurePojo(body) };
      },
    }

    This is clearly an interceptor, but args were accidentally specified. Before
    this would make it not register, and TypeScript couldn't detect the issue.

    Now this is treated as an interceptor (args ignored); and there is a console warning

@data-client/[email protected]

01 Mar 13:57
56d8beb
Compare
Choose a tag to compare

Patch Changes

  • #3390 32cccdb Thanks @ntucker! - Improve performance by using Map() instead of Object for unbounded keys

@data-client/[email protected]

01 Mar 14:32
39f9f7b
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

01 Mar 14:14
5f59f4b
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

01 Mar 13:56
56d8beb
Compare
Choose a tag to compare

Patch Changes

  • #3390 32cccdb Thanks @ntucker! - Improve performance by using Map() instead of Object for unbounded keys

@data-client/[email protected]

01 Mar 14:32
39f9f7b
Compare
Choose a tag to compare

Patch Changes

  • d41f658 Thanks @ntucker! - Improve performance by using Map() instead of Object for unbounded keys #3390