@vrplatform/graphql 1.0.3 → 1.0.4
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.
|
@@ -51,8 +51,7 @@ function useHasuraClientInner(args) {
|
|
|
51
51
|
}),
|
|
52
52
|
mode: 'cors',
|
|
53
53
|
});
|
|
54
|
-
|
|
55
|
-
return json; //await defaultResponseHandler(json);
|
|
54
|
+
return await (0, gqty_1.defaultResponseHandler)(response);
|
|
56
55
|
};
|
|
57
56
|
const subscriptionsClient = args?.subscriptions === true
|
|
58
57
|
? (0, subscriptions_1.createSubscriptionsClient)({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSubscriptionsClient } from '@gqty/subscriptions';
|
|
2
2
|
// import fetch from 'cross-fetch';
|
|
3
|
-
import { Cache, createClient } from 'gqty';
|
|
3
|
+
import { Cache, createClient, defaultResponseHandler, } from 'gqty';
|
|
4
4
|
import { hasuraGraphqlUri, hasuraQueryTypeHeader } from './constants';
|
|
5
5
|
import { generatedSchema, scalarsEnumsHash, } from './gqty';
|
|
6
6
|
export function useHasuraClientInner(args) {
|
|
@@ -48,8 +48,7 @@ export function useHasuraClientInner(args) {
|
|
|
48
48
|
}),
|
|
49
49
|
mode: 'cors',
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
return json; //await defaultResponseHandler(json);
|
|
51
|
+
return await defaultResponseHandler(response);
|
|
53
52
|
};
|
|
54
53
|
const subscriptionsClient = args?.subscriptions === true
|
|
55
54
|
? createSubscriptionsClient({
|
package/package.json
CHANGED
package/src/create-client.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { createSubscriptionsClient } from '@gqty/subscriptions';
|
|
2
2
|
// import fetch from 'cross-fetch';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Cache,
|
|
5
|
+
type QueryFetcher,
|
|
6
|
+
createClient,
|
|
7
|
+
defaultResponseHandler,
|
|
8
|
+
} from 'gqty';
|
|
4
9
|
import { hasuraGraphqlUri, hasuraQueryTypeHeader } from './constants';
|
|
5
10
|
import {
|
|
6
11
|
type GeneratedSchema,
|
|
@@ -60,8 +65,7 @@ export function useHasuraClientInner(args?: Omit<GqlAuthParam, 'retries'>) {
|
|
|
60
65
|
mode: 'cors',
|
|
61
66
|
});
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
return json; //await defaultResponseHandler(json);
|
|
68
|
+
return await defaultResponseHandler(response);
|
|
65
69
|
};
|
|
66
70
|
|
|
67
71
|
const subscriptionsClient =
|