You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Fixed query key indexing in actor queries context and added default timestamp-based hash generation.
### What changed?
- Fixed the `queryFn` implementations to correctly access the `actorId` from the query key array at index 2 instead of index 1
- Added a default value for the `hash` parameter that uses the current timestamp (`Date.now()`) when no hash is provided
### How to test?
1. Verify that actor queries work correctly by navigating to the actor inspector in the UI
2. Test with both explicit hash values and without providing a hash to ensure the default timestamp-based hash works properly
3. Confirm that all actor-related queries (ping, state, connections, database, events, RPCs, auto-wake-up) function as expected
### Why make this change?
The previous implementation had incorrect indexing when accessing query key elements, which could lead to undefined values and errors. The query key structure is `[hash, "actor", actorId, ...]`, so the `actorId` is at index 2, not index 1. Additionally, providing a default timestamp-based hash ensures that the context always has a unique identifier even when not explicitly provided.
0 commit comments