Skip to content

Releases: reactive/data-client

@data-client/[email protected]

26 Jul 11:56
2aaf110
Compare
Choose a tag to compare

Patch Changes

  • #3165 3fa9eb9 Thanks @ntucker! - Query can take Object Schemas

    This enables joining arbitrary objects (whose pk works with the same arguments.)

    class Ticker extends Entity {
      product_id = '';
      price = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    class Stats extends Entity {
      product_id = '';
      last = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    const queryPrice = new schema.Query(
      { ticker: Ticker, stats: Stats },
      ({ ticker, stats }) => ticker?.price ?? stats?.last,
    );
  • Updated dependencies [3fa9eb9]:

@data-client/[email protected]

26 Jul 11:56
2aaf110
Compare
Choose a tag to compare

Patch Changes

  • #3165 3fa9eb9 Thanks @ntucker! - Query can take Object Schemas

    This enables joining arbitrary objects (whose pk works with the same arguments.)

    class Ticker extends Entity {
      product_id = '';
      price = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    class Stats extends Entity {
      product_id = '';
      last = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    const queryPrice = new schema.Query(
      { ticker: Ticker, stats: Stats },
      ({ ticker, stats }) => ticker?.price ?? stats?.last,
    );

@data-client/[email protected]

26 Jul 11:56
2aaf110
Compare
Choose a tag to compare

Patch Changes

  • #3165 3fa9eb9 Thanks @ntucker! - Query can take Object Schemas

    This enables joining arbitrary objects (whose pk works with the same arguments.)

    class Ticker extends Entity {
      product_id = '';
      price = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    class Stats extends Entity {
      product_id = '';
      last = 0;
    
      pk(): string {
        return this.product_id;
      }
    }
    const queryPrice = new schema.Query(
      { ticker: Ticker, stats: Stats },
      ({ ticker, stats }) => ticker?.price ?? stats?.last,
    );
  • Updated dependencies [3fa9eb9]:

@data-client/[email protected]

25 Jul 13:02
5a3287e
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

25 Jul 13:01
5a3287e
Compare
Choose a tag to compare

Patch Changes

  • #3164 ffea6fc Thanks @ntucker! - Manager.getMiddleware() -> Manager.middleware

    getMiddleware() is still supported to make this change non-breaking

  • 82fbb85 Thanks @ntucker! - Middleware types include union of possible actions

  • 262587c Thanks @ntucker! - Add SchemaClass type export

@data-client/[email protected]

23 Jul 10:04
785208c
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

23 Jul 10:04
785208c
Compare
Choose a tag to compare

Patch Changes

  • #3161 b932dca Thanks @ntucker! - Add jsdocs to IdlingNetworkManager

  • e4751d9 Thanks @ntucker! - NetworkManager constructor uses keyword args

    Before

    new NetworkManager(42, 7);

    After

    new NetworkManager({ dataExpiryLength: 42, errorExpiryLength: 7 });
  • 0adad92 Thanks @ntucker! - Update debugging link

  • 09ad848 Thanks @ntucker! - state.endpoints moved above indexes

    entites and endpoints are the most commonly inspected
    parts of state when debugging, so it is better to have endpoints
    above indexes.

  • #3161 b932dca Thanks @ntucker! - Add configuration to getDefaultManagers()

    // completely remove DevToolsManager
    const managers = getDefaultManagers({ devToolsManager: null });
    // easier configuration
    const managers = getDefaultManagers({
      devToolsManager: {
        // double latency to help with high frequency updates
        latency: 1000,
        // skip websocket updates as these are too spammy
        predicate: (state, action) =>
          action.type !== actionTypes.SET_TYPE || action.schema !== Ticker,
      },
    });
    // passing instance allows us to use custom classes as well
    const managers = getDefaultManagers({
      networkManager: new CustomNetworkManager(),
    });
  • Updated dependencies [b932dca, e4751d9, 09ad848]:

@data-client/[email protected]

23 Jul 10:04
785208c
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

23 Jul 10:04
785208c
Compare
Choose a tag to compare

Patch Changes

@data-client/[email protected]

23 Jul 10:04
785208c
Compare
Choose a tag to compare

Patch Changes

  • #3161 b932dca Thanks @ntucker! - Add jsdocs to IdlingNetworkManager

  • e4751d9 Thanks @ntucker! - NetworkManager constructor uses keyword args

    Before

    new NetworkManager(42, 7);

    After

    new NetworkManager({ dataExpiryLength: 42, errorExpiryLength: 7 });
  • 09ad848 Thanks @ntucker! - state.endpoints moved above indexes

    entites and endpoints are the most commonly inspected
    parts of state when debugging, so it is better to have endpoints
    above indexes.