houdini 1.0.11 → 1.1.1-next.0

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 (67) hide show
  1. package/build/cmd-cjs/index.js +659 -330
  2. package/build/cmd-esm/index.js +659 -330
  3. package/build/codegen/generators/artifacts/selection.d.ts +5 -2
  4. package/build/codegen/generators/typescript/inlineType.d.ts +1 -1
  5. package/build/codegen/transforms/{composeQueries.d.ts → collectDefinitions.d.ts} +1 -1
  6. package/build/codegen/transforms/fragmentVariables.d.ts +2 -4
  7. package/build/codegen/transforms/index.d.ts +1 -1
  8. package/build/codegen/utils/flattenSelections.d.ts +2 -2
  9. package/build/codegen-cjs/index.js +604 -326
  10. package/build/codegen-esm/index.js +604 -326
  11. package/build/lib/config.d.ts +10 -1
  12. package/build/lib/deepMerge.d.ts +1 -1
  13. package/build/lib/types.d.ts +1 -0
  14. package/build/lib-cjs/index.js +261 -115
  15. package/build/lib-esm/index.js +260 -115
  16. package/build/runtime/cache/cache.d.ts +17 -6
  17. package/build/runtime/client/documentStore.d.ts +1 -0
  18. package/build/runtime/client/plugins/cache.d.ts +3 -2
  19. package/build/runtime/client/plugins/fragment.d.ts +2 -0
  20. package/build/runtime/client/plugins/index.d.ts +1 -0
  21. package/build/runtime/lib/scalars.d.ts +0 -1
  22. package/build/runtime/lib/types.d.ts +55 -7
  23. package/build/runtime-cjs/cache/cache.d.ts +17 -6
  24. package/build/runtime-cjs/cache/cache.js +89 -21
  25. package/build/runtime-cjs/cache/lists.js +2 -1
  26. package/build/runtime-cjs/cache/subscription.js +11 -2
  27. package/build/runtime-cjs/client/documentStore.d.ts +1 -0
  28. package/build/runtime-cjs/client/documentStore.js +5 -14
  29. package/build/runtime-cjs/client/index.js +2 -1
  30. package/build/runtime-cjs/client/plugins/cache.d.ts +3 -2
  31. package/build/runtime-cjs/client/plugins/cache.js +19 -3
  32. package/build/runtime-cjs/client/plugins/fetch.js +4 -1
  33. package/build/runtime-cjs/client/plugins/fragment.d.ts +2 -0
  34. package/build/runtime-cjs/client/plugins/fragment.js +76 -0
  35. package/build/runtime-cjs/client/plugins/index.d.ts +1 -0
  36. package/build/runtime-cjs/client/plugins/index.js +1 -0
  37. package/build/runtime-cjs/client/plugins/query.js +3 -5
  38. package/build/runtime-cjs/lib/scalars.d.ts +0 -1
  39. package/build/runtime-cjs/lib/scalars.js +2 -43
  40. package/build/runtime-cjs/lib/types.d.ts +55 -7
  41. package/build/runtime-cjs/lib/types.js +5 -2
  42. package/build/runtime-cjs/public/tests/test.js +4 -2
  43. package/build/runtime-esm/cache/cache.d.ts +17 -6
  44. package/build/runtime-esm/cache/cache.js +89 -22
  45. package/build/runtime-esm/cache/lists.js +2 -1
  46. package/build/runtime-esm/cache/subscription.js +11 -2
  47. package/build/runtime-esm/client/documentStore.d.ts +1 -0
  48. package/build/runtime-esm/client/documentStore.js +6 -15
  49. package/build/runtime-esm/client/index.js +3 -1
  50. package/build/runtime-esm/client/plugins/cache.d.ts +3 -2
  51. package/build/runtime-esm/client/plugins/cache.js +19 -3
  52. package/build/runtime-esm/client/plugins/fetch.js +5 -2
  53. package/build/runtime-esm/client/plugins/fragment.d.ts +2 -0
  54. package/build/runtime-esm/client/plugins/fragment.js +46 -0
  55. package/build/runtime-esm/client/plugins/index.d.ts +1 -0
  56. package/build/runtime-esm/client/plugins/index.js +1 -0
  57. package/build/runtime-esm/client/plugins/query.js +3 -5
  58. package/build/runtime-esm/lib/scalars.d.ts +0 -1
  59. package/build/runtime-esm/lib/scalars.js +1 -41
  60. package/build/runtime-esm/lib/types.d.ts +55 -7
  61. package/build/runtime-esm/lib/types.js +3 -1
  62. package/build/runtime-esm/public/tests/test.js +4 -2
  63. package/build/test-cjs/index.js +658 -329
  64. package/build/test-esm/index.js +658 -329
  65. package/build/vite-cjs/index.js +657 -328
  66. package/build/vite-esm/index.js +657 -328
  67. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
1
  import * as graphql from 'graphql';
2
2
  import type { Config, Document } from '../../../lib';
3
3
  import { type MutationOperation, type SubscriptionSelection } from '../../../runtime/lib/types';
4
- export default function selection({ config, filepath, rootType, selections, operations, path, includeFragments, document, inConnection, }: {
4
+ export default function (args: Omit<Parameters<typeof prepareSelection>[0], 'typeMap' | 'abstractTypes'>): SubscriptionSelection;
5
+ declare function prepareSelection({ config, filepath, rootType, selections, operations, path, document, inConnection, typeMap, abstractTypes, }: {
5
6
  config: Config;
6
7
  filepath: string;
7
8
  rootType: string;
@@ -10,7 +11,9 @@ export default function selection({ config, filepath, rootType, selections, oper
10
11
  [path: string]: MutationOperation[];
11
12
  };
12
13
  path?: string[];
13
- includeFragments: boolean;
14
14
  document: Document;
15
15
  inConnection?: boolean;
16
+ typeMap: Record<string, string[]>;
17
+ abstractTypes: string[];
16
18
  }): SubscriptionSelection;
19
+ export {};
@@ -1,7 +1,7 @@
1
1
  import type { TSTypeKind, StatementKind } from 'ast-types/lib/gen/kinds';
2
2
  import * as graphql from 'graphql';
3
3
  import type { Config } from '../../../lib';
4
- export declare const fragmentKey = "$fragments";
4
+ export declare const fragmentKey = " $fragments";
5
5
  export declare function inlineType({ config, filepath, rootType, selections, root, allowReadonly, body, visitedTypes, missingScalars, includeFragments, allOptional, }: {
6
6
  config: Config;
7
7
  filepath: string;
@@ -6,4 +6,4 @@ export type FragmentDependency = {
6
6
  document: Document;
7
7
  };
8
8
  export default function includeFragmentDefinitions(config: Config, documents: Document[]): Promise<void>;
9
- export declare function collectFragments(config: Config, docs: Document[]): Record<string, FragmentDependency>;
9
+ export declare function collectDefinitions(config: Config, docs: Document[]): Record<string, FragmentDependency>;
@@ -1,8 +1,7 @@
1
1
  import * as graphql from 'graphql';
2
- import type { Config, Document } from '../../lib';
3
- import type { FragmentDependency } from './composeQueries';
2
+ import type { Config, Document, ValueMap } from '../../lib';
3
+ import type { FragmentDependency } from './collectDefinitions';
4
4
  export default function fragmentVariables(config: Config, documents: Document[]): Promise<void>;
5
- type ValueMap = Record<string, graphql.ValueNode>;
6
5
  export declare function inlineFragmentArgs({ config, filepath, fragmentDefinitions, document, generatedFragments, visitedFragments, scope, newName, }: {
7
6
  config: Config;
8
7
  filepath: string;
@@ -27,4 +26,3 @@ export declare function collectWithArguments(config: Config, filepath: string, n
27
26
  hash: string;
28
27
  };
29
28
  export declare function fragmentArgumentsDefinitions(config: Config, filepath: string, definition: graphql.FragmentDefinitionNode): graphql.VariableDefinitionNode[];
30
- export {};
@@ -1,4 +1,4 @@
1
- export { default as composeQueries } from './composeQueries';
1
+ export { default as collectDefinitions } from './collectDefinitions';
2
2
  export { default as internalSchema } from './schema';
3
3
  export { default as list } from './list';
4
4
  export { default as typename } from './typename';
@@ -1,12 +1,12 @@
1
1
  import type graphql from 'graphql';
2
2
  import type { Config } from '../../lib';
3
- export declare function flattenSelections({ config, filepath, selections, fragmentDefinitions, applyFragments, ignoreMaskDisable, }: {
3
+ export declare function flattenSelections({ config, filepath, selections, fragmentDefinitions, ignoreMaskDisable, keepFragmentSpreadNodes, }: {
4
4
  config: Config;
5
5
  filepath: string;
6
6
  selections: readonly graphql.SelectionNode[];
7
7
  fragmentDefinitions: {
8
8
  [name: string]: graphql.FragmentDefinitionNode;
9
9
  };
10
- applyFragments: boolean;
11
10
  ignoreMaskDisable?: boolean;
11
+ keepFragmentSpreadNodes?: boolean;
12
12
  }): readonly graphql.SelectionNode[];