houdini 1.0.0-next.15 → 1.0.0-next.16

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/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  <div align="center">
2
- <img alt="houdini" height="200" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/houdini-v5.png" />
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assetss/logo_l.svg">
4
+ <img height="140" alt="Houdini's logo (dark or light)" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/logo_d.svg">
5
+ </picture>
3
6
  <br />
4
7
  <br />
5
8
  <strong>
@@ -76513,8 +76513,8 @@ async function updatePackageJSON(targetPath) {
76513
76513
  }
76514
76514
  packageJSON.devDependencies = {
76515
76515
  ...packageJSON.devDependencies,
76516
- houdini: "^1.0.0-next.15",
76517
- "houdini-svelte": "^1.0.0-next.15"
76516
+ houdini: "^1.0.0-next.16",
76517
+ "houdini-svelte": "^1.0.0-next.16"
76518
76518
  };
76519
76519
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
76520
76520
  }
@@ -76518,8 +76518,8 @@ async function updatePackageJSON(targetPath) {
76518
76518
  }
76519
76519
  packageJSON.devDependencies = {
76520
76520
  ...packageJSON.devDependencies,
76521
- houdini: "^1.0.0-next.15",
76522
- "houdini-svelte": "^1.0.0-next.15"
76521
+ houdini: "^1.0.0-next.16",
76522
+ "houdini-svelte": "^1.0.0-next.16"
76523
76523
  };
76524
76524
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
76525
76525
  }
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
12
12
  }): {} | null | undefined;
13
13
  export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
14
14
  export declare function isScalar(config: ConfigFile, type: string): boolean;
15
- export declare function parseScalar(config: ConfigFile, type: string, value: string): string | number | boolean;
15
+ export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
12
12
  }): {} | null | undefined;
13
13
  export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
14
14
  export declare function isScalar(config: ConfigFile, type: string): boolean;
15
- export declare function parseScalar(config: ConfigFile, type: string, value: string): string | number | boolean;
15
+ export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
@@ -145,6 +145,9 @@ function isScalar(config, type) {
145
145
  return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
146
146
  }
147
147
  function parseScalar(config, type, value) {
148
+ if (typeof value === "undefined") {
149
+ return void 0;
150
+ }
148
151
  if (type === "Boolean") {
149
152
  return value === "true";
150
153
  }
@@ -155,10 +158,18 @@ function parseScalar(config, type, value) {
155
158
  return value;
156
159
  }
157
160
  if (type === "Int") {
158
- return parseInt(value, 10);
161
+ const result = parseInt(value, 10);
162
+ if (Number.isNaN(result)) {
163
+ return void 0;
164
+ }
165
+ return result;
159
166
  }
160
167
  if (type === "Float") {
161
- return parseFloat(value);
168
+ const result = parseFloat(value);
169
+ if (Number.isNaN(result)) {
170
+ return void 0;
171
+ }
172
+ return result;
162
173
  }
163
174
  if (config.scalars?.[type]?.marshal) {
164
175
  return config.scalars[type]?.marshal(value);
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
12
12
  }): {} | null | undefined;
13
13
  export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
14
14
  export declare function isScalar(config: ConfigFile, type: string): boolean;
15
- export declare function parseScalar(config: ConfigFile, type: string, value: string): string | number | boolean;
15
+ export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
@@ -118,6 +118,9 @@ function isScalar(config, type) {
118
118
  return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
119
119
  }
120
120
  function parseScalar(config, type, value) {
121
+ if (typeof value === "undefined") {
122
+ return void 0;
123
+ }
121
124
  if (type === "Boolean") {
122
125
  return value === "true";
123
126
  }
@@ -128,10 +131,18 @@ function parseScalar(config, type, value) {
128
131
  return value;
129
132
  }
130
133
  if (type === "Int") {
131
- return parseInt(value, 10);
134
+ const result = parseInt(value, 10);
135
+ if (Number.isNaN(result)) {
136
+ return void 0;
137
+ }
138
+ return result;
132
139
  }
133
140
  if (type === "Float") {
134
- return parseFloat(value);
141
+ const result = parseFloat(value);
142
+ if (Number.isNaN(result)) {
143
+ return void 0;
144
+ }
145
+ return result;
135
146
  }
136
147
  if (config.scalars?.[type]?.marshal) {
137
148
  return config.scalars[type]?.marshal(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.0.0-next.15",
3
+ "version": "1.0.0-next.16",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",