@ctx-core/graphql-client 7.0.116 → 7.0.120

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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # @ctx-core/graphql-client
2
2
 
3
+ ## 7.0.120
4
+
5
+ ### Patch Changes
6
+
7
+ - sideEffects = false
8
+ - Updated dependencies
9
+ - @ctx-core/dom@11.1.5
10
+ - @ctx-core/fetch@11.0.109
11
+ - @ctx-core/object@22.0.12
12
+
13
+ ## 7.0.119
14
+
15
+ ### Patch Changes
16
+
17
+ - @swc/core: ^1.2.125 -> ^1.2.127
18
+ - @types/node: ^17.0.7 -> ^17.0.8
19
+ - Updated dependencies
20
+ - @ctx-core/dom@11.1.4
21
+ - @ctx-core/fetch@11.0.108
22
+ - @ctx-core/object@22.0.11
23
+
24
+ ## 7.0.118
25
+
26
+ ### Patch Changes
27
+
28
+ - update dependencies
29
+
30
+ ## 7.0.117
31
+
32
+ ### Patch Changes
33
+
34
+ - version bump
35
+ - Updated dependencies
36
+ - @ctx-core/dom@11.1.3
37
+ - @ctx-core/fetch@11.0.106
38
+ - @ctx-core/object@22.0.10
39
+
3
40
  ## 7.0.116
4
41
 
5
42
  ### Patch Changes
@@ -1,8 +1,7 @@
1
1
  import { graphql_fetch_ } from './graphql_fetch_.js';
2
2
  import { graphql_url_ } from './graphql_url_.js';
3
3
  let in_graphql_fetch;
4
- export function graphql_fetch(body, fn_in_http_opts = {
5
- }) {
4
+ export function graphql_fetch(body, fn_in_http_opts = {}) {
6
5
  if (!in_graphql_fetch) {
7
6
  in_graphql_fetch = graphql_fetch_({
8
7
  url: graphql_url_()
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphql_fetch.ts"],"sourcesContent":["import { graphql_fetch_, graphql_fetch_T } from './graphql_fetch_.js'\nimport { graphql_url_ } from './graphql_url_.js'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nlet in_graphql_fetch: graphql_fetch_T\nexport function graphql_fetch<data_T extends unknown = unknown>(\n\tbody:string,\n\tfn_in_http_opts:FetchHttpOpts = {},\n):Promise<graphql_fetch_response_T<data_T>> {\n\tif (!in_graphql_fetch) {\n\t\tin_graphql_fetch = graphql_fetch_<data_T>({\n\t\t\turl: graphql_url_(),\n\t\t})\n\t}\n\treturn in_graphql_fetch(body, fn_in_http_opts) as Promise<graphql_fetch_response_T<data_T>>\n}\nexport interface graphql_fetch_response_T<data_T extends unknown = unknown> {\n\tdata: data_T\n}\nexport {\n\tgraphql_fetch as fetch_graphql,\n\tgraphql_fetch as fetch__graphql,\n}\n"],"names":["graphql_fetch_","graphql_url_","in_graphql_fetch","graphql_fetch","body","fn_in_http_opts","url","fetch_graphql","fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAyB,CAAqB;AACrE,MAAM,GAAGC,YAAY,QAAQ,CAAmB;AAEhD,GAAG,CAACC,gBAAgB;AACpB,MAAM,UAAUC,aAAa,CAC5BC,IAAW,EACXC,eAA6B,GAAG,CAAC;AAAA,CAAC,EACS,CAAC;IAC5C,EAAE,GAAGH,gBAAgB,EAAE,CAAC;QACvBA,gBAAgB,GAAGF,cAAc,CAAS,CAAC;YAC1CM,GAAG,EAAEL,YAAY;QAClB,CAAC;IACF,CAAC;IACD,MAAM,CAACC,gBAAgB,CAACE,IAAI,EAAEC,eAAe;AAC9C,CAAC;AAID,MAAM,GACLF,aAAa,IAAII,aAAa,EAC9BJ,aAAa,IAAIK,cAAc"}
1
+ {"version":3,"sources":["../src/graphql_fetch.ts"],"sourcesContent":["import { graphql_fetch_, graphql_fetch_T } from './graphql_fetch_.js'\nimport { graphql_url_ } from './graphql_url_.js'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nlet in_graphql_fetch: graphql_fetch_T\nexport function graphql_fetch<data_T extends unknown = unknown>(\n\tbody:string,\n\tfn_in_http_opts:FetchHttpOpts = {},\n):Promise<graphql_fetch_response_T<data_T>> {\n\tif (!in_graphql_fetch) {\n\t\tin_graphql_fetch = graphql_fetch_<data_T>({\n\t\t\turl: graphql_url_(),\n\t\t})\n\t}\n\treturn in_graphql_fetch(body, fn_in_http_opts) as Promise<graphql_fetch_response_T<data_T>>\n}\nexport interface graphql_fetch_response_T<data_T extends unknown = unknown> {\n\tdata: data_T\n}\nexport {\n\tgraphql_fetch as fetch_graphql,\n\tgraphql_fetch as fetch__graphql,\n}\n"],"names":["graphql_fetch_","graphql_url_","in_graphql_fetch","graphql_fetch","body","fn_in_http_opts","url","fetch_graphql","fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAyB,CAAqB;AACrE,MAAM,GAAGC,YAAY,QAAQ,CAAmB;AAEhD,GAAG,CAACC,gBAAgB;AACpB,MAAM,UAAUC,aAAa,CAC5BC,IAAW,EACXC,eAA6B,GAAG,CAAC,CAAC,EACS,CAAC;IAC5C,EAAE,GAAGH,gBAAgB,EAAE,CAAC;QACvBA,gBAAgB,GAAGF,cAAc,CAAS,CAAC;YAC1CM,GAAG,EAAEL,YAAY;QAClB,CAAC;IACF,CAAC;IACD,MAAM,CAACC,gBAAgB,CAACE,IAAI,EAAEC,eAAe;AAC9C,CAAC;AAID,MAAM,GACLF,aAAa,IAAII,aAAa,EAC9BJ,aAAa,IAAIK,cAAc"}
@@ -1,9 +1,7 @@
1
1
  import { fetch } from '@ctx-core/fetch';
2
2
  import { assign } from '@ctx-core/object';
3
- export function graphql_fetch_(in_http_opts = {
4
- }) {
5
- return async function graphql_fetch(body, fn_in_http_opts = {
6
- }) {
3
+ export function graphql_fetch_(in_http_opts = {}) {
4
+ return async function graphql_fetch(body, fn_in_http_opts = {}) {
7
5
  const url = fn_in_http_opts.url || in_http_opts.url;
8
6
  if (!url) {
9
7
  throw `no url prop`;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphql_fetch_.ts"],"sourcesContent":["import { fetch } from '@ctx-core/fetch'\nimport { assign } from '@ctx-core/object'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nexport function graphql_fetch_<O1 extends unknown = unknown>(\n\tin_http_opts = {} as FetchHttpOpts\n):graphql_fetch_T<O1> {\n\treturn async function graphql_fetch<O2 extends unknown = O1>(\n\t\tbody:string,\n\t\tfn_in_http_opts:FetchHttpOpts = {},\n\t):Promise<O2> {\n\t\tconst url = fn_in_http_opts.url || in_http_opts.url\n\t\tif (!url) {\n\t\t\tthrow `no url prop`\n\t\t}\n\t\tconst response = await fetch(url, assign({\n\t\t\tmethod: 'POST',\n\t\t\theaders: assign({\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t}, in_http_opts.headers, fn_in_http_opts.headers),\n\t\t\tbody,\n\t\t}, in_http_opts, fn_in_http_opts))\n\t\tif (!response.ok) {\n\t\t\tif (process.env.NODE_ENV === 'production') {\n\t\t\t\tconsole.error(await response.text())\n\t\t\t\tthrow `Error fetching graphql`\n\t\t\t} else {\n\t\t\t\tthrow (await response.text())\n\t\t\t}\n\t\t}\n\t\tconst payload = await response.json()\n\t\tif (payload.errors) throw payload\n\t\treturn payload as O2\n\t}\n}\nexport type graphql_fetch_T<O extends unknown = unknown> =\n\t(body:string, fn_in_http_opts:FetchHttpOpts)=>Promise<O>\nexport {\n\tgraphql_fetch_ as _graphql_fetch,\n\tgraphql_fetch_ as _fetch__graphql,\n}\n"],"names":["fetch","assign","graphql_fetch_","in_http_opts","graphql_fetch","body","fn_in_http_opts","url","response","method","headers","ok","process","env","NODE_ENV","console","error","text","payload","json","errors","_graphql_fetch","_fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,MAAM,QAAQ,CAAkB;AAEzC,MAAM,UAAUC,cAAc,CAC7BC,YAAY,GAAG,CAAC;AAAA,CAAC,EACI,CAAC;IACtB,MAAM,gBAAgBC,aAAa,CAClCC,IAAW,EACXC,eAA6B,GAAG,CAAC;IAAA,CAAC,EACrB,CAAC;QACd,KAAK,CAACC,GAAG,GAAGD,eAAe,CAACC,GAAG,IAAIJ,YAAY,CAACI,GAAG;QACnD,EAAE,GAAGA,GAAG,EAAE,CAAC;YACV,KAAK,EAAE,WAAW;QACnB,CAAC;QACD,KAAK,CAACC,QAAQ,GAAG,KAAK,CAACR,KAAK,CAACO,GAAG,EAAEN,MAAM,CAAC,CAAC;YACzCQ,MAAM,EAAE,CAAM;YACdC,OAAO,EAAET,MAAM,CAAC,CAAC;gBAChB,CAAc,eAAE,CAAkB;YACnC,CAAC,EAAEE,YAAY,CAACO,OAAO,EAAEJ,eAAe,CAACI,OAAO;YAChDL,IAAI;QACL,CAAC,EAAEF,YAAY,EAAEG,eAAe;QAChC,EAAE,GAAGE,QAAQ,CAACG,EAAE,EAAE,CAAC;YAClB,EAAE,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,CAAY,aAAE,CAAC;gBAC3CC,OAAO,CAACC,KAAK,CAAC,KAAK,CAACR,QAAQ,CAACS,IAAI;gBACjC,KAAK,EAAE,sBAAsB;YAC9B,CAAC,MAAM,CAAC;gBACP,KAAK,CAAE,KAAK,CAACT,QAAQ,CAACS,IAAI;YAC3B,CAAC;QACF,CAAC;QACD,KAAK,CAACC,OAAO,GAAG,KAAK,CAACV,QAAQ,CAACW,IAAI;QACnC,EAAE,EAAED,OAAO,CAACE,MAAM,EAAE,KAAK,CAACF,OAAO;QACjC,MAAM,CAACA,OAAO;IACf,CAAC;AACF,CAAC;AAGD,MAAM,GACLhB,cAAc,IAAImB,cAAc,EAChCnB,cAAc,IAAIoB,eAAe"}
1
+ {"version":3,"sources":["../src/graphql_fetch_.ts"],"sourcesContent":["import { fetch } from '@ctx-core/fetch'\nimport { assign } from '@ctx-core/object'\nimport type { FetchHttpOpts } from './FetchHttpOpts.js'\nexport function graphql_fetch_<O1 extends unknown = unknown>(\n\tin_http_opts = {} as FetchHttpOpts\n):graphql_fetch_T<O1> {\n\treturn async function graphql_fetch<O2 extends unknown = O1>(\n\t\tbody:string,\n\t\tfn_in_http_opts:FetchHttpOpts = {},\n\t):Promise<O2> {\n\t\tconst url = fn_in_http_opts.url || in_http_opts.url\n\t\tif (!url) {\n\t\t\tthrow `no url prop`\n\t\t}\n\t\tconst response = await fetch(url, assign({\n\t\t\tmethod: 'POST',\n\t\t\theaders: assign({\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t}, in_http_opts.headers, fn_in_http_opts.headers),\n\t\t\tbody,\n\t\t}, in_http_opts, fn_in_http_opts))\n\t\tif (!response.ok) {\n\t\t\tif (process.env.NODE_ENV === 'production') {\n\t\t\t\tconsole.error(await response.text())\n\t\t\t\tthrow `Error fetching graphql`\n\t\t\t} else {\n\t\t\t\tthrow (await response.text())\n\t\t\t}\n\t\t}\n\t\tconst payload = await response.json()\n\t\tif (payload.errors) throw payload\n\t\treturn payload as O2\n\t}\n}\nexport type graphql_fetch_T<O extends unknown = unknown> =\n\t(body:string, fn_in_http_opts:FetchHttpOpts)=>Promise<O>\nexport {\n\tgraphql_fetch_ as _graphql_fetch,\n\tgraphql_fetch_ as _fetch__graphql,\n}\n"],"names":["fetch","assign","graphql_fetch_","in_http_opts","graphql_fetch","body","fn_in_http_opts","url","response","method","headers","ok","process","env","NODE_ENV","console","error","text","payload","json","errors","_graphql_fetch","_fetch__graphql"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,MAAM,QAAQ,CAAkB;AAEzC,MAAM,UAAUC,cAAc,CAC7BC,YAAY,GAAG,CAAC,CAAC,EACI,CAAC;IACtB,MAAM,gBAAgBC,aAAa,CAClCC,IAAW,EACXC,eAA6B,GAAG,CAAC,CAAC,EACrB,CAAC;QACd,KAAK,CAACC,GAAG,GAAGD,eAAe,CAACC,GAAG,IAAIJ,YAAY,CAACI,GAAG;QACnD,EAAE,GAAGA,GAAG,EAAE,CAAC;YACV,KAAK,EAAE,WAAW;QACnB,CAAC;QACD,KAAK,CAACC,QAAQ,GAAG,KAAK,CAACR,KAAK,CAACO,GAAG,EAAEN,MAAM,CAAC,CAAC;YACzCQ,MAAM,EAAE,CAAM;YACdC,OAAO,EAAET,MAAM,CAAC,CAAC;gBAChB,CAAc,eAAE,CAAkB;YACnC,CAAC,EAAEE,YAAY,CAACO,OAAO,EAAEJ,eAAe,CAACI,OAAO;YAChDL,IAAI;QACL,CAAC,EAAEF,YAAY,EAAEG,eAAe;QAChC,EAAE,GAAGE,QAAQ,CAACG,EAAE,EAAE,CAAC;YAClB,EAAE,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,CAAY,aAAE,CAAC;gBAC3CC,OAAO,CAACC,KAAK,CAAC,KAAK,CAACR,QAAQ,CAACS,IAAI;gBACjC,KAAK,EAAE,sBAAsB;YAC9B,CAAC,MAAM,CAAC;gBACP,KAAK,CAAE,KAAK,CAACT,QAAQ,CAACS,IAAI;YAC3B,CAAC;QACF,CAAC;QACD,KAAK,CAACC,OAAO,GAAG,KAAK,CAACV,QAAQ,CAACW,IAAI;QACnC,EAAE,EAAED,OAAO,CAACE,MAAM,EAAE,KAAK,CAACF,OAAO;QACjC,MAAM,CAACA,OAAO;IACf,CAAC;AACF,CAAC;AAGD,MAAM,GACLhB,cAAc,IAAImB,cAAc,EAChCnB,cAAc,IAAIoB,eAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/graphql-client",
3
- "version": "7.0.116",
3
+ "version": "7.0.120",
4
4
  "description": "ctx-core graphql-client",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -25,14 +25,14 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ctx-core/dom": "^11.1.2",
29
- "@ctx-core/fetch": "^11.0.104",
30
- "@ctx-core/object": "^22.0.8"
28
+ "@ctx-core/dom": "^11.1.5",
29
+ "@ctx-core/fetch": "^11.0.109",
30
+ "@ctx-core/object": "^22.0.12"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@swc/cli": "^0.1.55",
34
- "@swc/core": "^1.2.124",
35
- "@types/node": "^17.0.6",
34
+ "@swc/core": "^1.2.127",
35
+ "@types/node": "^17.0.8",
36
36
  "rimraf": "^3.0.2",
37
37
  "typescript": "next"
38
38
  },
@@ -41,6 +41,7 @@
41
41
  "cache": "~/.npm"
42
42
  },
43
43
  "svelte": "./lib/index.js",
44
+ "sideEffects": false,
44
45
  "scripts": {
45
46
  "@ctx-core/graphql": "workspace:^9.0.30",
46
47
  "build": "npm run compile",