@trackunit/react-graphql-hooks 1.20.5 → 1.20.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@trackunit/react-graphql-hooks",
3
- "version": "1.20.5",
3
+ "version": "1.20.7",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/i18n-library-translation": "1.17.5",
11
- "@trackunit/shared-utils": "1.13.91",
10
+ "@trackunit/i18n-library-translation": "1.17.6",
11
+ "@trackunit/shared-utils": "1.13.92",
12
12
  "es-toolkit": "^1.39.10",
13
- "@trackunit/react-components": "1.21.5"
13
+ "@trackunit/react-components": "1.21.7"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "^19.0.0",
@@ -13,6 +13,21 @@ export type PaginationQuery<TData> = {
13
13
  previousData: TData | undefined;
14
14
  reset: () => void;
15
15
  };
16
+ /**
17
+ * Constraint for TVariables — properties are required (but nullable) so that
18
+ * TypeScript rejects documents whose generated variables type omits them.
19
+ *
20
+ * Used as a conditional check rather than a generic `extends` bound because
21
+ * `TypedDocumentNode` makes `TVariables` invariant (both co- and contravariant),
22
+ * which prevents `extends RelayPaginationVariablesConstraint` from working when
23
+ * the document's variables type has additional required fields.
24
+ */
25
+ export interface RelayPaginationVariablesConstraint extends ApolloOperationVariables {
26
+ readonly after: string | null | undefined;
27
+ readonly before: string | null | undefined;
28
+ readonly first: number | null | undefined;
29
+ readonly last: number | null | undefined;
30
+ }
16
31
  type TypedDocumentNode<TData, TVariables> = ApolloTypedDocumentNode<TData, TVariables>;
17
32
  export interface PaginationQueryProps<TData, TVariables extends ApolloOperationVariables = ApolloOperationVariables> extends ApolloLazyQueryHookOptions<TData, TVariables> {
18
33
  /**