houdini 1.2.0-react.1 → 1.2.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 (80) hide show
  1. package/README.md +1 -1
  2. package/build/cmd-cjs/index.js +2285 -1577
  3. package/build/cmd-esm/index.js +2285 -1577
  4. package/build/codegen/generators/artifacts/selection.d.ts +2 -1
  5. package/build/codegen/generators/typescript/inlineType.d.ts +5 -2
  6. package/build/codegen/generators/typescript/loadingState.d.ts +8 -0
  7. package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
  8. package/build/codegen/utils/flattenSelections.d.ts +2 -1
  9. package/build/codegen-cjs/index.js +2215 -1531
  10. package/build/codegen-esm/index.js +2215 -1531
  11. package/build/lib/config.d.ts +5 -0
  12. package/build/lib/graphql.d.ts +5 -1
  13. package/build/lib/parse.d.ts +10 -1
  14. package/build/lib-cjs/index.js +702 -578
  15. package/build/lib-esm/index.js +699 -578
  16. package/build/runtime/cache/cache.d.ts +9 -8
  17. package/build/runtime/cache/stuff.d.ts +1 -4
  18. package/build/runtime/client/documentStore.d.ts +3 -3
  19. package/build/runtime/client/index.d.ts +8 -7
  20. package/build/runtime/client/plugins/cache.d.ts +1 -1
  21. package/build/runtime/client/plugins/fetch.d.ts +1 -0
  22. package/build/runtime/client/plugins/subscription.d.ts +1 -0
  23. package/build/runtime/client/plugins/throwOnError.d.ts +2 -1
  24. package/build/runtime/lib/pagination.d.ts +4 -6
  25. package/build/runtime/lib/selection.d.ts +1 -1
  26. package/build/runtime/lib/types.d.ts +37 -4
  27. package/build/runtime-cjs/cache/cache.d.ts +9 -8
  28. package/build/runtime-cjs/cache/cache.js +108 -43
  29. package/build/runtime-cjs/cache/stuff.d.ts +1 -4
  30. package/build/runtime-cjs/cache/stuff.js +2 -2
  31. package/build/runtime-cjs/cache/subscription.js +5 -5
  32. package/build/runtime-cjs/client/documentStore.d.ts +3 -3
  33. package/build/runtime-cjs/client/documentStore.js +10 -2
  34. package/build/runtime-cjs/client/index.d.ts +8 -7
  35. package/build/runtime-cjs/client/index.js +12 -4
  36. package/build/runtime-cjs/client/plugins/cache.d.ts +1 -1
  37. package/build/runtime-cjs/client/plugins/cache.js +10 -2
  38. package/build/runtime-cjs/client/plugins/fetch.d.ts +1 -0
  39. package/build/runtime-cjs/client/plugins/fetch.js +3 -2
  40. package/build/runtime-cjs/client/plugins/subscription.d.ts +1 -0
  41. package/build/runtime-cjs/client/plugins/subscription.js +1 -0
  42. package/build/runtime-cjs/client/plugins/throwOnError.d.ts +2 -1
  43. package/build/runtime-cjs/lib/config.js +2 -1
  44. package/build/runtime-cjs/lib/pagination.d.ts +4 -6
  45. package/build/runtime-cjs/lib/pagination.js +0 -12
  46. package/build/runtime-cjs/lib/scalars.js +1 -1
  47. package/build/runtime-cjs/lib/selection.d.ts +1 -1
  48. package/build/runtime-cjs/lib/selection.js +28 -1
  49. package/build/runtime-cjs/lib/types.d.ts +37 -4
  50. package/build/runtime-cjs/lib/types.js +3 -0
  51. package/build/runtime-esm/cache/cache.d.ts +9 -8
  52. package/build/runtime-esm/cache/cache.js +109 -44
  53. package/build/runtime-esm/cache/stuff.d.ts +1 -4
  54. package/build/runtime-esm/cache/stuff.js +2 -2
  55. package/build/runtime-esm/cache/subscription.js +5 -5
  56. package/build/runtime-esm/client/documentStore.d.ts +3 -3
  57. package/build/runtime-esm/client/documentStore.js +10 -2
  58. package/build/runtime-esm/client/index.d.ts +8 -7
  59. package/build/runtime-esm/client/index.js +15 -7
  60. package/build/runtime-esm/client/plugins/cache.d.ts +1 -1
  61. package/build/runtime-esm/client/plugins/cache.js +10 -2
  62. package/build/runtime-esm/client/plugins/fetch.d.ts +1 -0
  63. package/build/runtime-esm/client/plugins/fetch.js +3 -2
  64. package/build/runtime-esm/client/plugins/subscription.d.ts +1 -0
  65. package/build/runtime-esm/client/plugins/subscription.js +1 -0
  66. package/build/runtime-esm/client/plugins/throwOnError.d.ts +2 -1
  67. package/build/runtime-esm/lib/config.js +2 -1
  68. package/build/runtime-esm/lib/pagination.d.ts +4 -6
  69. package/build/runtime-esm/lib/pagination.js +0 -12
  70. package/build/runtime-esm/lib/scalars.js +1 -1
  71. package/build/runtime-esm/lib/selection.d.ts +1 -1
  72. package/build/runtime-esm/lib/selection.js +28 -1
  73. package/build/runtime-esm/lib/types.d.ts +37 -4
  74. package/build/runtime-esm/lib/types.js +2 -0
  75. package/build/test/index.d.ts +15 -0
  76. package/build/test-cjs/index.js +2248 -1534
  77. package/build/test-esm/index.js +2248 -1534
  78. package/build/vite-cjs/index.js +2315 -1605
  79. package/build/vite-esm/index.js +2315 -1605
  80. package/package.json +7 -1
@@ -86,6 +86,8 @@ export declare class Config {
86
86
  get listPrependDirective(): string;
87
87
  get listAppendDirective(): string;
88
88
  get listParentDirective(): string;
89
+ get blockingDirective(): string;
90
+ get blockingDisableDirective(): string;
89
91
  /**
90
92
  * @deprecated
91
93
  */
@@ -96,6 +98,7 @@ export declare class Config {
96
98
  get removeFragmentSuffix(): string;
97
99
  get toggleFragmentSuffix(): string;
98
100
  get deleteDirectiveSuffix(): string;
101
+ get loadingDirective(): string;
99
102
  get whenDirective(): string;
100
103
  get whenNotDirective(): string;
101
104
  get liveDirective(): string;
@@ -106,6 +109,7 @@ export declare class Config {
106
109
  get cacheDirective(): string;
107
110
  get cachePartialArg(): string;
108
111
  get cachePolicyArg(): string;
112
+ get requiredDirective(): string;
109
113
  paginationQueryName(documentName: string): string;
110
114
  isDeleteDirective(name: string): boolean;
111
115
  listDeleteDirective(name: string): string;
@@ -128,6 +132,7 @@ export declare class Config {
128
132
  args: ValueMap | null;
129
133
  fragment: string;
130
134
  };
135
+ serializeValueMap(map: ValueMap | null): ValueMap | null;
131
136
  isListFragment(name: string): boolean;
132
137
  isListOperationDirective(name: string): boolean;
133
138
  isFragmentForList(listName: string, fragmentName: string): boolean;
@@ -6,8 +6,12 @@ export declare function hashDocument({ document, }: {
6
6
  document: string | Document;
7
7
  }): string;
8
8
  type GraphQLParentType = graphql.GraphQLObjectType | graphql.GraphQLInputObjectType | graphql.GraphQLInterfaceType;
9
+ export declare function parentField(ancestors: readonly any[]): graphql.FieldNode | graphql.InlineFragmentNode | graphql.OperationDefinitionNode | graphql.FragmentDefinitionNode | null;
9
10
  export declare function parentTypeFromAncestors(schema: graphql.GraphQLSchema, filepath: string, ancestors: readonly any[]): GraphQLParentType;
10
- export declare function definitionFromAncestors(ancestors: readonly any[]): graphql.OperationDefinitionNode | graphql.FragmentDefinitionNode;
11
+ export declare function definitionFromAncestors(ancestors: readonly any[]): {
12
+ parents: (graphql.OperationDefinitionNode | graphql.FragmentDefinitionNode | graphql.SelectionSetNode | graphql.FieldNode | graphql.InlineFragmentNode)[];
13
+ definition: graphql.OperationDefinitionNode | graphql.FragmentDefinitionNode;
14
+ };
11
15
  export declare function formatErrors(e: unknown, afterError?: (e: Error) => void): void;
12
16
  export declare function operation_requires_variables(operation: graphql.OperationDefinitionNode): boolean;
13
17
  export declare function unwrapType(config: Config, type: any, wrappers?: TypeWrapper[]): {
@@ -1,9 +1,18 @@
1
1
  import { type ParserOptions } from '@babel/parser';
2
+ import type { Options } from 'recast';
2
3
  import type { Maybe, Script } from './types';
3
4
  export type ParsedFile = Maybe<{
4
5
  script: Script;
5
6
  start: number;
6
7
  end: number;
7
8
  }>;
8
- export declare function parseJS(str: string, config?: Partial<ParserOptions>): Promise<ParsedFile>;
9
+ export declare function parseJS(str: string, config?: Partial<ParserOptions>): Promise<Script>;
9
10
  export declare function parseJSON(str: string): any;
11
+ type PrintOptions = Options & {
12
+ pretty?: boolean;
13
+ };
14
+ export declare function printJS(script: Script, options?: PrintOptions): Promise<{
15
+ code: string;
16
+ map?: any;
17
+ }>;
18
+ export {};