houdini 1.2.27 → 1.2.28

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 (71) hide show
  1. package/build/adapter/index.d.ts +1 -1
  2. package/build/cmd-cjs/index.js +4169 -1854
  3. package/build/cmd-esm/index.js +4169 -1854
  4. package/build/codegen/generators/artifacts/selection.d.ts +2 -1
  5. package/build/codegen/generators/typescript/inlineType.d.ts +5 -1
  6. package/build/codegen/generators/typescript/typeReference.d.ts +1 -1
  7. package/build/codegen/generators/typescript/types.d.ts +6 -3
  8. package/build/codegen/transforms/collectDefinitions.d.ts +1 -1
  9. package/build/codegen/transforms/componentFields.d.ts +8 -0
  10. package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
  11. package/build/codegen/transforms/index.d.ts +1 -0
  12. package/build/codegen/validators/componentFields.d.ts +2 -0
  13. package/build/codegen/validators/index.d.ts +1 -0
  14. package/build/codegen-cjs/index.js +3674 -1393
  15. package/build/codegen-esm/index.js +3674 -1393
  16. package/build/lib/config.d.ts +21 -1
  17. package/build/lib/detectTools.d.ts +1 -1
  18. package/build/lib/graphql.d.ts +6 -0
  19. package/build/lib/imports.d.ts +1 -1
  20. package/build/lib/router/conventions.d.ts +1 -0
  21. package/build/lib/types.d.ts +4 -2
  22. package/build/lib/walk.d.ts +1 -0
  23. package/build/lib-cjs/index.js +1120 -747
  24. package/build/lib-esm/index.js +1119 -747
  25. package/build/runtime/cache/cache.d.ts +24 -3
  26. package/build/runtime/cache/storage.d.ts +1 -1
  27. package/build/runtime/client/index.d.ts +1 -0
  28. package/build/runtime/index.d.ts +1 -1
  29. package/build/runtime/lib/config.d.ts +9 -0
  30. package/build/runtime/lib/index.d.ts +1 -0
  31. package/build/runtime/lib/types.d.ts +18 -1
  32. package/build/runtime/router/server.d.ts +3 -1
  33. package/build/runtime/router/types.d.ts +1 -0
  34. package/build/runtime-cjs/cache/cache.d.ts +24 -3
  35. package/build/runtime-cjs/cache/cache.js +78 -8
  36. package/build/runtime-cjs/cache/storage.d.ts +1 -1
  37. package/build/runtime-cjs/cache/storage.js +16 -3
  38. package/build/runtime-cjs/client/index.d.ts +1 -0
  39. package/build/runtime-cjs/client/index.js +1 -0
  40. package/build/runtime-cjs/index.d.ts +1 -1
  41. package/build/runtime-cjs/lib/config.d.ts +9 -0
  42. package/build/runtime-cjs/lib/index.d.ts +1 -0
  43. package/build/runtime-cjs/lib/index.js +1 -0
  44. package/build/runtime-cjs/lib/types.d.ts +18 -1
  45. package/build/runtime-cjs/public/cache.js +3 -2
  46. package/build/runtime-cjs/router/server.d.ts +3 -1
  47. package/build/runtime-cjs/router/server.js +5 -2
  48. package/build/runtime-cjs/router/session.js +9 -6
  49. package/build/runtime-cjs/router/types.d.ts +1 -0
  50. package/build/runtime-esm/cache/cache.d.ts +24 -3
  51. package/build/runtime-esm/cache/cache.js +76 -8
  52. package/build/runtime-esm/cache/storage.d.ts +1 -1
  53. package/build/runtime-esm/cache/storage.js +16 -3
  54. package/build/runtime-esm/client/index.d.ts +1 -0
  55. package/build/runtime-esm/client/index.js +1 -0
  56. package/build/runtime-esm/index.d.ts +1 -1
  57. package/build/runtime-esm/lib/config.d.ts +9 -0
  58. package/build/runtime-esm/lib/index.d.ts +1 -0
  59. package/build/runtime-esm/lib/index.js +1 -0
  60. package/build/runtime-esm/lib/types.d.ts +18 -1
  61. package/build/runtime-esm/public/cache.js +3 -2
  62. package/build/runtime-esm/router/server.d.ts +3 -1
  63. package/build/runtime-esm/router/server.js +5 -2
  64. package/build/runtime-esm/router/session.js +9 -6
  65. package/build/runtime-esm/router/types.d.ts +1 -0
  66. package/build/test-cjs/index.js +3556 -1373
  67. package/build/test-esm/index.js +3556 -1373
  68. package/build/vite/schema.d.ts +4 -1
  69. package/build/vite-cjs/index.js +4543 -2823
  70. package/build/vite-esm/index.js +4540 -2822
  71. package/package.json +4 -3
@@ -2,7 +2,7 @@ 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
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, globalLoading, includeFragments, }: {
5
+ declare function prepareSelection({ config, filepath, rootType, selections, operations, path, document, inConnection, globalLoading, includeFragments, hasComponents, }: {
6
6
  config: Config;
7
7
  filepath: string;
8
8
  rootType: string;
@@ -15,5 +15,6 @@ declare function prepareSelection({ config, filepath, rootType, selections, oper
15
15
  inConnection?: boolean;
16
16
  globalLoading?: boolean;
17
17
  includeFragments?: boolean;
18
+ hasComponents: () => void;
18
19
  }): SubscriptionSelection;
19
20
  export {};
@@ -3,7 +3,7 @@ import * as graphql from 'graphql';
3
3
  import type { Config } from '../../../lib';
4
4
  import { TypeWrapper } from '../../../lib';
5
5
  export declare const fragmentKey: " $fragments";
6
- export declare function inlineType({ config, filepath, rootType, selections, root, allowReadonly, body, visitedTypes, missingScalars, includeFragments, allOptional, forceNonNull, }: {
6
+ export declare function inlineType({ config, filepath, rootType, selections, root, allowReadonly, body, visitedTypes, missingScalars, includeFragments, allOptional, forceNonNull, field, }: {
7
7
  config: Config;
8
8
  filepath: string;
9
9
  rootType: graphql.GraphQLNamedType;
@@ -14,6 +14,10 @@ export declare function inlineType({ config, filepath, rootType, selections, roo
14
14
  visitedTypes: Set<string>;
15
15
  missingScalars: Set<string>;
16
16
  includeFragments: boolean;
17
+ field: {
18
+ parent: string;
19
+ field: string;
20
+ } | null;
17
21
  allOptional?: boolean;
18
22
  forceNonNull?: boolean;
19
23
  }): TSTypeKind;
@@ -2,7 +2,7 @@ import type { StatementKind, TSTypeKind } from 'ast-types/lib/gen/kinds';
2
2
  import * as graphql from 'graphql';
3
3
  import * as recast from 'recast';
4
4
  import type { Config } from '../../../lib';
5
- export declare function tsTypeReference(config: Config, missingScalars: Set<string>, definition: {
5
+ export declare function tsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, definition: {
6
6
  type: graphql.GraphQLScalarType | graphql.GraphQLInputType | graphql.GraphQLNamedType | graphql.TypeNode;
7
7
  }, body: StatementKind[]): TSTypeKind;
8
8
  export declare function enumReference(config: Config, body: StatementKind[], name: string): recast.types.namedTypes.TSTypeReference;
@@ -1,7 +1,10 @@
1
- import type { TSTypeKind } from 'ast-types/lib/gen/kinds';
1
+ import type { StatementKind, TSTypeKind } from 'ast-types/lib/gen/kinds';
2
2
  import * as graphql from 'graphql';
3
3
  import * as recast from 'recast';
4
- import type { Config } from '../../../lib';
4
+ import { type Config } from '../../../lib';
5
5
  export declare function readonlyProperty(prop: recast.types.namedTypes.TSPropertySignature, enable?: boolean): recast.types.namedTypes.TSPropertySignature;
6
6
  export declare function nullableField(inner: TSTypeKind, input?: boolean): recast.types.namedTypes.TSUnionType;
7
- export declare function scalarPropertyValue(config: Config, missingScalars: Set<string>, target: graphql.GraphQLNamedType): TSTypeKind;
7
+ export declare function scalarPropertyValue(config: Config, filepath: string, missingScalars: Set<string>, target: graphql.GraphQLNamedType, body: StatementKind[], field: {
8
+ parent: string;
9
+ field: string;
10
+ } | null): TSTypeKind;
@@ -1,4 +1,4 @@
1
- import type * as graphql from 'graphql';
1
+ import * as graphql from 'graphql';
2
2
  import type { Config, Document } from '../../lib';
3
3
  export type FragmentDependency = {
4
4
  definition: graphql.FragmentDefinitionNode;
@@ -0,0 +1,8 @@
1
+ import * as graphql from 'graphql';
2
+ import type { Config, Document } from '../../lib';
3
+ export type FragmentDependency = {
4
+ definition: graphql.FragmentDefinitionNode;
5
+ requiredFragments: string[];
6
+ document: Document;
7
+ };
8
+ export default function componentFields(config: Config, documents: Document[]): Promise<void>;
@@ -8,7 +8,7 @@ export type FragmentArgument = {
8
8
  required: boolean;
9
9
  defaultValue: graphql.ValueNode | null;
10
10
  };
11
- export declare function fragmentArguments(config: Config, filepath: string, definition: graphql.FragmentDefinitionNode): FragmentArgument[];
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;
13
13
  export declare function collectWithArguments(config: Config, filepath: string, node: graphql.FragmentSpreadNode, scope?: ValueMap | null): {
14
14
  args: ValueMap | null;
@@ -5,3 +5,4 @@ export { default as typename } from './typename';
5
5
  export { default as addID } from './addID';
6
6
  export { default as paginate } from './paginate';
7
7
  export { default as fragmentVariables } from './fragmentVariables';
8
+ export { default as componentFields } from './componentFields';
@@ -0,0 +1,2 @@
1
+ import type { Config, Document } from '../../lib';
2
+ export default function componentFields(config: Config, docs: Document[]): Promise<void>;
@@ -2,3 +2,4 @@ export { default as typeCheck } from './typeCheck';
2
2
  export { default as uniqueNames } from './uniqueNames';
3
3
  export { default as noIDAlias } from './noIDAlias';
4
4
  export { default as plugins } from './plugins';
5
+ export { default as componentFields } from './componentFields';