houdini 1.2.51 → 1.2.53

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.
@@ -71858,6 +71858,7 @@ function artifactGenerator(stats) {
71858
71858
  return;
71859
71859
  }
71860
71860
  const usedVariableNames = /* @__PURE__ */ new Set();
71861
+ const unusedVariables = /* @__PURE__ */ new Set();
71861
71862
  let documentWithoutInternalDirectives = graphql17.visit(document, {
71862
71863
  Directive(node) {
71863
71864
  if (config.isInternalDirective(node.name.value)) {
@@ -71877,6 +71878,7 @@ function artifactGenerator(stats) {
71877
71878
  VariableDefinition(variableDefinitionNode) {
71878
71879
  const name2 = variableDefinitionNode.variable.name.value;
71879
71880
  if (!usedVariableNames.has(name2)) {
71881
+ unusedVariables.add(name2);
71880
71882
  return null;
71881
71883
  }
71882
71884
  }
@@ -71965,6 +71967,7 @@ function artifactGenerator(stats) {
71965
71967
  refetch: doc.refetch,
71966
71968
  raw: rawString,
71967
71969
  rootType,
71970
+ stripVariables: [...unusedVariables],
71968
71971
  selection: selection_default({
71969
71972
  config,
71970
71973
  filepath: doc.filename,
@@ -78327,12 +78330,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78327
78330
  }
78328
78331
  packageJSON2.devDependencies = {
78329
78332
  ...packageJSON2.devDependencies,
78330
- houdini: "^1.2.51"
78333
+ houdini: "^1.2.53"
78331
78334
  };
78332
78335
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78333
78336
  packageJSON2.devDependencies = {
78334
78337
  ...packageJSON2.devDependencies,
78335
- "houdini-svelte": "^1.2.51"
78338
+ "houdini-svelte": "^1.2.53"
78336
78339
  };
78337
78340
  } else {
78338
78341
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -71863,6 +71863,7 @@ function artifactGenerator(stats) {
71863
71863
  return;
71864
71864
  }
71865
71865
  const usedVariableNames = /* @__PURE__ */ new Set();
71866
+ const unusedVariables = /* @__PURE__ */ new Set();
71866
71867
  let documentWithoutInternalDirectives = graphql17.visit(document, {
71867
71868
  Directive(node) {
71868
71869
  if (config.isInternalDirective(node.name.value)) {
@@ -71882,6 +71883,7 @@ function artifactGenerator(stats) {
71882
71883
  VariableDefinition(variableDefinitionNode) {
71883
71884
  const name2 = variableDefinitionNode.variable.name.value;
71884
71885
  if (!usedVariableNames.has(name2)) {
71886
+ unusedVariables.add(name2);
71885
71887
  return null;
71886
71888
  }
71887
71889
  }
@@ -71970,6 +71972,7 @@ function artifactGenerator(stats) {
71970
71972
  refetch: doc.refetch,
71971
71973
  raw: rawString,
71972
71974
  rootType,
71975
+ stripVariables: [...unusedVariables],
71973
71976
  selection: selection_default({
71974
71977
  config,
71975
71978
  filepath: doc.filename,
@@ -78332,12 +78335,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78332
78335
  }
78333
78336
  packageJSON2.devDependencies = {
78334
78337
  ...packageJSON2.devDependencies,
78335
- houdini: "^1.2.51"
78338
+ houdini: "^1.2.53"
78336
78339
  };
78337
78340
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78338
78341
  packageJSON2.devDependencies = {
78339
78342
  ...packageJSON2.devDependencies,
78340
- "houdini-svelte": "^1.2.51"
78343
+ "houdini-svelte": "^1.2.53"
78341
78344
  };
78342
78345
  } else {
78343
78346
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -60059,6 +60059,7 @@ function artifactGenerator(stats) {
60059
60059
  return;
60060
60060
  }
60061
60061
  const usedVariableNames = /* @__PURE__ */ new Set();
60062
+ const unusedVariables = /* @__PURE__ */ new Set();
60062
60063
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60063
60064
  Directive(node) {
60064
60065
  if (config.isInternalDirective(node.name.value)) {
@@ -60078,6 +60079,7 @@ function artifactGenerator(stats) {
60078
60079
  VariableDefinition(variableDefinitionNode) {
60079
60080
  const name2 = variableDefinitionNode.variable.name.value;
60080
60081
  if (!usedVariableNames.has(name2)) {
60082
+ unusedVariables.add(name2);
60081
60083
  return null;
60082
60084
  }
60083
60085
  }
@@ -60166,6 +60168,7 @@ function artifactGenerator(stats) {
60166
60168
  refetch: doc.refetch,
60167
60169
  raw: rawString,
60168
60170
  rootType,
60171
+ stripVariables: [...unusedVariables],
60169
60172
  selection: selection_default({
60170
60173
  config,
60171
60174
  filepath: doc.filename,
@@ -60058,6 +60058,7 @@ function artifactGenerator(stats) {
60058
60058
  return;
60059
60059
  }
60060
60060
  const usedVariableNames = /* @__PURE__ */ new Set();
60061
+ const unusedVariables = /* @__PURE__ */ new Set();
60061
60062
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60062
60063
  Directive(node) {
60063
60064
  if (config.isInternalDirective(node.name.value)) {
@@ -60077,6 +60078,7 @@ function artifactGenerator(stats) {
60077
60078
  VariableDefinition(variableDefinitionNode) {
60078
60079
  const name2 = variableDefinitionNode.variable.name.value;
60079
60080
  if (!usedVariableNames.has(name2)) {
60081
+ unusedVariables.add(name2);
60080
60082
  return null;
60081
60083
  }
60082
60084
  }
@@ -60165,6 +60167,7 @@ function artifactGenerator(stats) {
60165
60167
  refetch: doc.refetch,
60166
60168
  raw: rawString,
60167
60169
  rootType,
60170
+ stripVariables: [...unusedVariables],
60168
60171
  selection: selection_default({
60169
60172
  config,
60170
60173
  filepath: doc.filename,
@@ -66094,8 +66094,11 @@ var fetch2 = (target) => {
66094
66094
  name: ctx.name,
66095
66095
  text: ctx.text,
66096
66096
  hash: ctx.hash,
66097
- variables: marshalVariables2(ctx)
66097
+ variables: { ...marshalVariables2(ctx) }
66098
66098
  };
66099
+ for (const variable of ctx.artifact.stripVariables) {
66100
+ delete fetchParams2.variables[variable];
66101
+ }
66099
66102
  let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
66100
66103
  if (target) {
66101
66104
  if (typeof target === "string") {
@@ -66010,8 +66010,11 @@ var fetch2 = (target) => {
66010
66010
  name: ctx.name,
66011
66011
  text: ctx.text,
66012
66012
  hash: ctx.hash,
66013
- variables: marshalVariables2(ctx)
66013
+ variables: { ...marshalVariables2(ctx) }
66014
66014
  };
66015
+ for (const variable of ctx.artifact.stripVariables) {
66016
+ delete fetchParams2.variables[variable];
66017
+ }
66015
66018
  let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
66016
66019
  if (target) {
66017
66020
  if (typeof target === "string") {
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -36,8 +36,11 @@ const fetch = (target) => {
36
36
  name: ctx.name,
37
37
  text: ctx.text,
38
38
  hash: ctx.hash,
39
- variables: marshalVariables(ctx)
39
+ variables: { ...marshalVariables(ctx) }
40
40
  };
41
+ for (const variable of ctx.artifact.stripVariables) {
42
+ delete fetchParams.variables[variable];
43
+ }
41
44
  let fetchFn = defaultFetch(client.url, ctx.fetchParams);
42
45
  if (target) {
43
46
  if (typeof target === "string") {
@@ -39,6 +39,7 @@ function createStore(args = {}) {
39
39
  pipeline: args.pipeline ? (0, import__.createPluginHooks)(client.plugins) : void 0,
40
40
  client,
41
41
  artifact: args.artifact ?? {
42
+ stripVariables: [],
42
43
  kind: import_types.ArtifactKind.Query,
43
44
  hash: "7777",
44
45
  raw: "RAW_TEXT",
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -30,6 +30,7 @@ var import_cache2 = require("../cache");
30
30
  const testCache = () => new import_cache2.Cache(new import_cache.Cache((0, import_test.testConfigFile)()));
31
31
  const testFragment = (selection) => ({
32
32
  artifact: {
33
+ stripVariables: [],
33
34
  kind: import_lib.ArtifactKind.Fragment,
34
35
  hash: "",
35
36
  raw: "",
@@ -41,6 +42,7 @@ const testFragment = (selection) => ({
41
42
  });
42
43
  const testQuery = (selection) => ({
43
44
  artifact: {
45
+ stripVariables: [],
44
46
  kind: import_lib.ArtifactKind.Query,
45
47
  hash: "",
46
48
  raw: "",
@@ -11,8 +11,11 @@ const fetch = (target) => {
11
11
  name: ctx.name,
12
12
  text: ctx.text,
13
13
  hash: ctx.hash,
14
- variables: marshalVariables(ctx)
14
+ variables: { ...marshalVariables(ctx) }
15
15
  };
16
+ for (const variable of ctx.artifact.stripVariables) {
17
+ delete fetchParams.variables[variable];
18
+ }
16
19
  let fetchFn = defaultFetch(client.url, ctx.fetchParams);
17
20
  if (target) {
18
21
  if (typeof target === "string") {
@@ -15,6 +15,7 @@ function createStore(args = {}) {
15
15
  pipeline: args.pipeline ? createPluginHooks(client.plugins) : void 0,
16
16
  client,
17
17
  artifact: args.artifact ?? {
18
+ stripVariables: [],
18
19
  kind: ArtifactKind.Query,
19
20
  hash: "7777",
20
21
  raw: "RAW_TEXT",
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -7,6 +7,7 @@ import { Cache } from "../cache";
7
7
  const testCache = () => new Cache(new _Cache(testConfigFile()));
8
8
  const testFragment = (selection) => ({
9
9
  artifact: {
10
+ stripVariables: [],
10
11
  kind: ArtifactKind.Fragment,
11
12
  hash: "",
12
13
  raw: "",
@@ -18,6 +19,7 @@ const testFragment = (selection) => ({
18
19
  });
19
20
  const testQuery = (selection) => ({
20
21
  artifact: {
22
+ stripVariables: [],
21
23
  kind: ArtifactKind.Query,
22
24
  hash: "",
23
25
  raw: "",
@@ -60425,6 +60425,7 @@ function artifactGenerator(stats) {
60425
60425
  return;
60426
60426
  }
60427
60427
  const usedVariableNames = /* @__PURE__ */ new Set();
60428
+ const unusedVariables = /* @__PURE__ */ new Set();
60428
60429
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60429
60430
  Directive(node) {
60430
60431
  if (config.isInternalDirective(node.name.value)) {
@@ -60444,6 +60445,7 @@ function artifactGenerator(stats) {
60444
60445
  VariableDefinition(variableDefinitionNode) {
60445
60446
  const name2 = variableDefinitionNode.variable.name.value;
60446
60447
  if (!usedVariableNames.has(name2)) {
60448
+ unusedVariables.add(name2);
60447
60449
  return null;
60448
60450
  }
60449
60451
  }
@@ -60532,6 +60534,7 @@ function artifactGenerator(stats) {
60532
60534
  refetch: doc.refetch,
60533
60535
  raw: rawString,
60534
60536
  rootType,
60537
+ stripVariables: [...unusedVariables],
60535
60538
  selection: selection_default({
60536
60539
  config,
60537
60540
  filepath: doc.filename,
@@ -60421,6 +60421,7 @@ function artifactGenerator(stats) {
60421
60421
  return;
60422
60422
  }
60423
60423
  const usedVariableNames = /* @__PURE__ */ new Set();
60424
+ const unusedVariables = /* @__PURE__ */ new Set();
60424
60425
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60425
60426
  Directive(node) {
60426
60427
  if (config.isInternalDirective(node.name.value)) {
@@ -60440,6 +60441,7 @@ function artifactGenerator(stats) {
60440
60441
  VariableDefinition(variableDefinitionNode) {
60441
60442
  const name2 = variableDefinitionNode.variable.name.value;
60442
60443
  if (!usedVariableNames.has(name2)) {
60444
+ unusedVariables.add(name2);
60443
60445
  return null;
60444
60446
  }
60445
60447
  }
@@ -60528,6 +60530,7 @@ function artifactGenerator(stats) {
60528
60530
  refetch: doc.refetch,
60529
60531
  raw: rawString,
60530
60532
  rootType,
60533
+ stripVariables: [...unusedVariables],
60531
60534
  selection: selection_default({
60532
60535
  config,
60533
60536
  filepath: doc.filename,
@@ -73276,6 +73276,7 @@ function artifactGenerator(stats) {
73276
73276
  return;
73277
73277
  }
73278
73278
  const usedVariableNames = /* @__PURE__ */ new Set();
73279
+ const unusedVariables = /* @__PURE__ */ new Set();
73279
73280
  let documentWithoutInternalDirectives = graphql17.visit(document, {
73280
73281
  Directive(node) {
73281
73282
  if (config2.isInternalDirective(node.name.value)) {
@@ -73295,6 +73296,7 @@ function artifactGenerator(stats) {
73295
73296
  VariableDefinition(variableDefinitionNode) {
73296
73297
  const name2 = variableDefinitionNode.variable.name.value;
73297
73298
  if (!usedVariableNames.has(name2)) {
73299
+ unusedVariables.add(name2);
73298
73300
  return null;
73299
73301
  }
73300
73302
  }
@@ -73383,6 +73385,7 @@ function artifactGenerator(stats) {
73383
73385
  refetch: doc.refetch,
73384
73386
  raw: rawString,
73385
73387
  rootType,
73388
+ stripVariables: [...unusedVariables],
73386
73389
  selection: selection_default({
73387
73390
  config: config2,
73388
73391
  filepath: doc.filename,
@@ -73269,6 +73269,7 @@ function artifactGenerator(stats) {
73269
73269
  return;
73270
73270
  }
73271
73271
  const usedVariableNames = /* @__PURE__ */ new Set();
73272
+ const unusedVariables = /* @__PURE__ */ new Set();
73272
73273
  let documentWithoutInternalDirectives = graphql17.visit(document, {
73273
73274
  Directive(node) {
73274
73275
  if (config2.isInternalDirective(node.name.value)) {
@@ -73288,6 +73289,7 @@ function artifactGenerator(stats) {
73288
73289
  VariableDefinition(variableDefinitionNode) {
73289
73290
  const name2 = variableDefinitionNode.variable.name.value;
73290
73291
  if (!usedVariableNames.has(name2)) {
73292
+ unusedVariables.add(name2);
73291
73293
  return null;
73292
73294
  }
73293
73295
  }
@@ -73376,6 +73378,7 @@ function artifactGenerator(stats) {
73376
73378
  refetch: doc.refetch,
73377
73379
  raw: rawString,
73378
73380
  rootType,
73381
+ stripVariables: [...unusedVariables],
73379
73382
  selection: selection_default({
73380
73383
  config: config2,
73381
73384
  filepath: doc.filename,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.2.51",
3
+ "version": "1.2.53",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",