@okam/directus-query 1.4.1 → 1.4.2
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/CHANGELOG.md +17 -0
- package/lib/init.d.ts +2 -1
- package/lib/providers/index.d.ts +4 -0
- package/lib/providers/interface.d.ts +11 -0
- package/package.json +2 -2
- package/server.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 1.4.2 (2025-07-24)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- update vite-plugin-dts to version 3 ([5d33c77](https://github.com/OKAMca/stack/commit/5d33c77))
|
|
6
|
+
- package deps error ([b665a45](https://github.com/OKAMca/stack/commit/b665a45))
|
|
7
|
+
- search field icon ([0850fde](https://github.com/OKAMca/stack/commit/0850fde))
|
|
8
|
+
|
|
9
|
+
### 🧱 Updated Dependencies
|
|
10
|
+
|
|
11
|
+
- Updated core-lib to 1.17.0
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- Marie-Maxime Tanguay
|
|
16
|
+
- Pierre-Olivier Clerson @poclerson
|
|
17
|
+
|
|
1
18
|
## 1.3.0 (2024-11-06)
|
|
2
19
|
|
|
3
20
|
|
package/lib/init.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
2
|
import { GraphQLClient } from 'graphql-request';
|
|
3
|
+
import type { Variables } from 'graphql-request';
|
|
3
4
|
import type { RequestConfig } from 'node_modules/graphql-request/build/legacy/helpers/types';
|
|
4
5
|
declare const initDirectusQuery: (graphqlEndPoint?: string, requestConfig?: RequestConfig) => {
|
|
5
|
-
queryGql: <TResult, TVariables extends
|
|
6
|
+
queryGql: <TResult, TVariables extends Variables>(document: TypedDocumentNode<TResult, TVariables>, queryKey?: TVariables) => Promise<TResult>;
|
|
6
7
|
client: GraphQLClient;
|
|
7
8
|
};
|
|
8
9
|
export default initDirectusQuery;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TGQLQueryContextProps, TGQLQueryProviderProps } from './interface';
|
|
2
|
+
declare const useGql: () => TGQLQueryContextProps;
|
|
3
|
+
export { useGql };
|
|
4
|
+
export declare function GqlQueryContextProvider({ children, client }: Readonly<TGQLQueryProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import type { GraphQLClient, Variables } from 'graphql-request';
|
|
4
|
+
import type React from 'react';
|
|
5
|
+
export type TGQLQueryProviderProps = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
client: GraphQLClient;
|
|
8
|
+
};
|
|
9
|
+
export type TGQLQueryContextProps = {
|
|
10
|
+
useGqlQuery: <TResult, TVariables extends Variables>(document: TypedDocumentNode<TResult, TVariables>, queryKey?: TVariables) => UseQueryResult;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okam/directus-query",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@graphql-codegen/cli": "^5.0.3",
|
|
26
26
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
27
|
-
"@okam/core-lib": "1.
|
|
27
|
+
"@okam/core-lib": "1.17.0",
|
|
28
28
|
"@okam/logger": "1.1.0",
|
|
29
29
|
"@tanstack/react-query": "^5.62.3",
|
|
30
30
|
"graphql-request": "^7.1.2",
|
package/server.d.ts
ADDED