@drupal-api-client/graphql-client 0.1.3 → 0.1.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.
- package/dist/index.js +1 -7
- package/dist/index.mjs +1 -5
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var apiClient = require('@drupal-api-client/api-client');
|
|
4
|
-
|
|
5
|
-
var t=class extends apiClient.ApiClient{constructor(s,e){super(s,e);let{apiPrefix:r}=e||{};this.apiPrefix=r||"graphql";}async query(s){let{response:e,error:r}=await this.fetch(`${this.baseUrl}/${this.apiPrefix}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`${s}`})});if(r)throw this.debug&&this.log("error",`GraphQL query failed, Error: ${r.message}`),r;return await e.json()}};
|
|
6
|
-
|
|
7
|
-
exports.GraphqlClient = t;
|
|
1
|
+
'use strict';var apiClient=require('@drupal-api-client/api-client');var t=class extends apiClient.ApiClient{constructor(s,e){super(s,e);let{apiPrefix:r}=e||{};this.apiPrefix=r||"graphql";}async query(s){let{response:e,error:r}=await this.fetch(`${this.baseUrl}${this.apiPrefix}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`${s}`})});if(r)throw this.debug&&this.log("error",`GraphQL query failed, Error: ${r.message}`),r;return await e.json()}};exports.GraphqlClient=t;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var t=class extends ApiClient{constructor(s,e){super(s,e);let{apiPrefix:r}=e||{};this.apiPrefix=r||"graphql";}async query(s){let{response:e,error:r}=await this.fetch(`${this.baseUrl}/${this.apiPrefix}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`${s}`})});if(r)throw this.debug&&this.log("error",`GraphQL query failed, Error: ${r.message}`),r;return await e.json()}};
|
|
4
|
-
|
|
5
|
-
export { t as GraphqlClient };
|
|
1
|
+
import {ApiClient}from'@drupal-api-client/api-client';var t=class extends ApiClient{constructor(s,e){super(s,e);let{apiPrefix:r}=e||{};this.apiPrefix=r||"graphql";}async query(s){let{response:e,error:r}=await this.fetch(`${this.baseUrl}${this.apiPrefix}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`${s}`})});if(r)throw this.debug&&this.log("error",`GraphQL query failed, Error: ${r.message}`),r;return await e.json()}};export{t as GraphqlClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drupal-api-client/graphql-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client to simplify interacting with Drupal GraphQL APIs",
|
|
6
6
|
"bugs": "https://www.drupal.org/project/issues/api_client",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@arethetypeswrong/cli": "^0.13.1",
|
|
37
|
-
"@vitest/coverage-v8": "^0.
|
|
37
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
38
38
|
"publint": "^0.2.0",
|
|
39
|
-
"tsup": "^
|
|
40
|
-
"vitest": "^0.
|
|
39
|
+
"tsup": "^8.5.1",
|
|
40
|
+
"vitest": "^4.0.0"
|
|
41
41
|
},
|
|
42
42
|
"typedocOptions": {
|
|
43
43
|
"entryPoints": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"msw": "2.0.8",
|
|
50
50
|
"nanostores": "^0.10.2",
|
|
51
|
-
"@drupal-api-client/api-client": "1.
|
|
51
|
+
"@drupal-api-client/api-client": "1.4.1"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"arethetypeswrong": "pnpm attw --pack .",
|