@graphql-suite/client 0.9.0 → 0.9.1

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.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @graphql-suite/client v0.9.0 | MIT */
1
+ /** @graphql-suite/client v0.9.1 | MIT */
2
2
  var j=(E)=>E.charAt(0).toUpperCase()+E.slice(1);function G(E,x,$,Y=4){let H=" ".repeat(Y),C=[];for(let[R,J]of Object.entries(E)){if(J===!0){C.push(`${H}${R}`);continue}if(typeof J==="object"&&J!==null){let X=$.relations[R];if(!X)continue;let A=x[X.entity];if(!A)continue;let Z=G(J,x,A,Y+2);C.push(`${H}${R} {`),C.push(Z),C.push(`${H}}`)}}return C.join(`
3
3
  `)}function L(E){return`${j(E)}Filters`}function S(E){return`${j(E)}OrderBy`}function p(E){return`${j(E)}InsertInput`}function c(E){return`${j(E)}UpdateInput`}function T(E,x,$,Y,H,C,R,J){let X=x.queryListName;if(!X)throw Error(`Entity '${E}' has no list query`);let A=L(E),Z=S(E),_=`${j(X)}Query`,V=[],I=[];if(H)V.push(`$where: ${A}`),I.push("where: $where");if(C)V.push(`$orderBy: ${Z}`),I.push("orderBy: $orderBy");if(R)V.push("$limit: Int"),I.push("limit: $limit");if(J)V.push("$offset: Int"),I.push("offset: $offset");let q=V.length?`(${V.join(", ")})`:"",U=I.length?`(${I.join(", ")})`:"",F=G(Y,$,x);return{query:`query ${_}${q} {
4
4
  ${X}${U} {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-suite/client",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Type-safe GraphQL client with entity-based API and full Drizzle type inference",
5
5
  "license": "MIT",
6
6
  "author": "https://github.com/dmythro",