houdini 1.5.5 → 2.0.0-next.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 (85) hide show
  1. package/build/cmd-cjs/index.js +29267 -22336
  2. package/build/cmd-esm/index.js +27820 -20890
  3. package/build/codegen/generators/artifacts/index.d.ts +8 -0
  4. package/build/codegen/generators/runtime/pluginRuntime.d.ts +3 -0
  5. package/build/codegen/index.d.ts +3 -2
  6. package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
  7. package/build/codegen/transforms/list.d.ts +2 -2
  8. package/build/codegen/transforms/paginate.d.ts +2 -34
  9. package/build/codegen/utils/flattenSelections.d.ts +1 -1
  10. package/build/codegen-cjs/index.js +24414 -19277
  11. package/build/codegen-esm/index.js +22975 -17838
  12. package/build/lib/config.d.ts +3 -0
  13. package/build/lib/fs.d.ts +3 -2
  14. package/build/lib/index.d.ts +1 -0
  15. package/build/lib/introspection.d.ts +1 -1
  16. package/build/lib/watchAndRun.d.ts +61 -0
  17. package/build/lib-cjs/index.js +26708 -20759
  18. package/build/lib-esm/index.js +25041 -19095
  19. package/build/runtime/lib/config.d.ts +7 -0
  20. package/build/runtime-cjs/cache/cache.js +22 -1
  21. package/build/runtime-cjs/cache/gc.js +1 -0
  22. package/build/runtime-cjs/cache/index.js +0 -2
  23. package/build/runtime-cjs/cache/lists.js +9 -0
  24. package/build/runtime-cjs/cache/staleManager.js +26 -1
  25. package/build/runtime-cjs/cache/storage.js +4 -0
  26. package/build/runtime-cjs/cache/subscription.js +1 -0
  27. package/build/runtime-cjs/client/documentStore.js +28 -2
  28. package/build/runtime-cjs/client/index.js +17 -1
  29. package/build/runtime-cjs/client/plugins/cache.js +8 -2
  30. package/build/runtime-cjs/client/plugins/fetch.js +14 -6
  31. package/build/runtime-cjs/client/plugins/fetchParams.js +2 -0
  32. package/build/runtime-cjs/client/plugins/fragment.js +1 -0
  33. package/build/runtime-cjs/client/plugins/index.js +9 -1
  34. package/build/runtime-cjs/client/plugins/injectedPlugins.js +0 -2
  35. package/build/runtime-cjs/client/plugins/mutation.js +6 -0
  36. package/build/runtime-cjs/client/plugins/optimisticKeys.js +10 -3
  37. package/build/runtime-cjs/client/plugins/query.js +4 -0
  38. package/build/runtime-cjs/client/utils/index.js +4 -0
  39. package/build/runtime-cjs/imports/config.js +0 -2
  40. package/build/runtime-cjs/imports/pluginConfig.js +0 -2
  41. package/build/runtime-cjs/index.js +12 -6
  42. package/build/runtime-cjs/lib/config.d.ts +7 -0
  43. package/build/runtime-cjs/lib/config.js +4 -0
  44. package/build/runtime-cjs/lib/deepEquals.js +2 -4
  45. package/build/runtime-cjs/lib/index.js +13 -0
  46. package/build/runtime-cjs/lib/pagination.js +2 -1
  47. package/build/runtime-cjs/lib/types.js +11 -1
  48. package/build/runtime-cjs/public/cache.js +11 -0
  49. package/build/runtime-cjs/public/record.js +5 -0
  50. package/build/runtime-cjs/router/jwt.js +15 -28
  51. package/build/runtime-cjs/router/match.js +2 -4
  52. package/build/runtime-cjs/router/server.js +6 -1
  53. package/build/runtime-cjs/router/session.js +1 -1
  54. package/build/runtime-esm/cache/cache.js +22 -1
  55. package/build/runtime-esm/cache/gc.js +1 -0
  56. package/build/runtime-esm/cache/lists.js +9 -0
  57. package/build/runtime-esm/cache/staleManager.js +26 -1
  58. package/build/runtime-esm/cache/storage.js +4 -0
  59. package/build/runtime-esm/cache/subscription.js +1 -0
  60. package/build/runtime-esm/client/documentStore.js +28 -2
  61. package/build/runtime-esm/client/index.js +13 -1
  62. package/build/runtime-esm/client/plugins/cache.js +4 -2
  63. package/build/runtime-esm/client/plugins/fetch.js +14 -6
  64. package/build/runtime-esm/client/plugins/fetchParams.js +2 -0
  65. package/build/runtime-esm/client/plugins/fragment.js +1 -0
  66. package/build/runtime-esm/client/plugins/mutation.js +6 -0
  67. package/build/runtime-esm/client/plugins/optimisticKeys.js +6 -3
  68. package/build/runtime-esm/client/plugins/query.js +4 -0
  69. package/build/runtime-esm/lib/config.d.ts +7 -0
  70. package/build/runtime-esm/lib/deepEquals.js +2 -4
  71. package/build/runtime-esm/lib/pagination.js +2 -1
  72. package/build/runtime-esm/lib/types.js +9 -0
  73. package/build/runtime-esm/public/cache.js +11 -0
  74. package/build/runtime-esm/public/record.js +5 -0
  75. package/build/runtime-esm/router/jwt.js +15 -28
  76. package/build/runtime-esm/router/match.js +2 -4
  77. package/build/runtime-esm/router/server.js +6 -1
  78. package/build/runtime-esm/router/session.js +1 -1
  79. package/build/test-cjs/index.js +26140 -21029
  80. package/build/test-esm/index.js +24475 -19364
  81. package/build/vite/hmr.d.ts +5 -0
  82. package/build/vite/schema.d.ts +0 -3
  83. package/build/vite-cjs/index.js +34920 -32093
  84. package/build/vite-esm/index.js +31443 -28617
  85. package/package.json +13 -14
@@ -1,4 +1,12 @@
1
1
  import type { Config, Document } from '../../../lib';
2
+ export interface ArtifactStats {
3
+ total: string[];
4
+ changed: string[];
5
+ new: string[];
6
+ deleted: string[];
7
+ hashSize: number[];
8
+ querySize: number[];
9
+ }
2
10
  export default function artifactGenerator(stats: {
3
11
  total: string[];
4
12
  new: string[];
@@ -6,6 +6,9 @@ export declare function moduleStatments(config: Config): {
6
6
  exportDefaultStatement: typeof exportDefault;
7
7
  exportStarStatement: typeof exportStarFrom;
8
8
  };
9
+ export declare function generateStaticRuntimes({ config }: {
10
+ config: Config;
11
+ }): Promise<void>;
9
12
  export declare function generatePluginRuntimes({ config, docs, }: {
10
13
  config: Config;
11
14
  docs: Document[];
@@ -1,6 +1,7 @@
1
1
  import type { Config, Document } from '../lib';
2
- export default function compile(config: Config): Promise<void>;
3
- export declare function runPipeline(config: Config, docs: Document[]): Promise<void>;
2
+ import type { ArtifactStats } from './generators/artifacts';
3
+ export default function compile(config: Config): Promise<ArtifactStats | undefined>;
4
+ export declare function runPipeline(config: Config, docs: Document[]): Promise<ArtifactStats | undefined>;
4
5
  export type DiscoveredDoc = {
5
6
  filepath: string;
6
7
  document: string;
@@ -6,7 +6,7 @@ export type FragmentArgument = {
6
6
  name: string;
7
7
  type: graphql.TypeNode;
8
8
  required: boolean;
9
- defaultValue: graphql.ValueNode | null;
9
+ defaultValue: graphql.ConstValueNode | null;
10
10
  };
11
11
  export declare function fragmentArguments(config: Config, filepath: string, definition: graphql.FragmentDefinitionNode | graphql.FragmentSpreadNode): FragmentArgument[];
12
12
  export declare function parseArgumentTypeString(input: string): graphql.TypeNode;
@@ -1,9 +1,9 @@
1
1
  import * as graphql from 'graphql';
2
2
  import type { Config, Document } from '../../lib';
3
3
  export default function addListFragments(config: Config, documents: Document[]): Promise<void>;
4
- export declare function connectionSelection(config: Config, field: graphql.GraphQLField<any, any>, type: graphql.GraphQLObjectType, selection: graphql.SelectionSetNode | undefined): {
4
+ export declare function connectionSelection(config: Config, field: graphql.GraphQLField<any, any>, type: graphql.GraphQLObjectType | graphql.GraphQLInterfaceType, selection: graphql.SelectionSetNode | undefined): {
5
5
  selection: graphql.SelectionSetNode | undefined;
6
- type: graphql.GraphQLObjectType;
6
+ type: graphql.GraphQLObjectType | graphql.GraphQLInterfaceType;
7
7
  connection: boolean;
8
8
  error: string | null;
9
9
  };
@@ -1,36 +1,4 @@
1
+ import * as graphql from 'graphql';
1
2
  import type { Config, Document } from '../../lib';
2
3
  export default function paginate(config: Config, documents: Document[]): Promise<void>;
3
- export declare const selectionConnectionInfo: {
4
- kind: "Field";
5
- name: {
6
- kind: "Name";
7
- value: string;
8
- };
9
- selectionSet: {
10
- kind: "SelectionSet";
11
- selections: ({
12
- kind: "Field";
13
- name: {
14
- kind: "Name";
15
- value: string;
16
- };
17
- selectionSet?: undefined;
18
- } | {
19
- kind: "Field";
20
- name: {
21
- kind: "Name";
22
- value: string;
23
- };
24
- selectionSet: {
25
- kind: "SelectionSet";
26
- selections: {
27
- kind: "Field";
28
- name: {
29
- kind: "Name";
30
- value: string;
31
- };
32
- }[];
33
- };
34
- })[];
35
- };
36
- }[];
4
+ export declare const selectionConnectionInfo: Array<graphql.SelectionNode>;
@@ -1,4 +1,4 @@
1
- import type * as graphql from 'graphql';
1
+ import * as graphql from 'graphql';
2
2
  import type { Config } from '../../lib';
3
3
  export declare function flattenSelections({ config, filepath, selections, fragmentDefinitions, applyFragments, }: {
4
4
  config: Config;