houdini 1.0.0-next.17 → 1.0.0-next.19

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 (38) hide show
  1. package/build/cmd-cjs/index.js +55 -39
  2. package/build/cmd-esm/index.js +55 -39
  3. package/build/codegen-cjs/index.js +52 -27
  4. package/build/codegen-esm/index.js +52 -27
  5. package/build/lib/config.d.ts +4 -6
  6. package/build/lib/types.d.ts +11 -10
  7. package/build/lib-cjs/index.js +35 -40
  8. package/build/lib-esm/index.js +35 -40
  9. package/build/runtime/cache/storage.d.ts +18 -15
  10. package/build/runtime/client/documentStore.d.ts +3 -3
  11. package/build/runtime/client/utils/documentPlugins.d.ts +2 -2
  12. package/build/runtime/lib/config.d.ts +2 -2
  13. package/build/runtime/lib/types.d.ts +40 -41
  14. package/build/runtime-cjs/cache/storage.d.ts +18 -15
  15. package/build/runtime-cjs/cache/storage.js +9 -11
  16. package/build/runtime-cjs/client/documentStore.d.ts +3 -3
  17. package/build/runtime-cjs/client/documentStore.js +0 -1
  18. package/build/runtime-cjs/client/index.js +0 -1
  19. package/build/runtime-cjs/client/plugins/cache.js +0 -1
  20. package/build/runtime-cjs/client/utils/documentPlugins.d.ts +2 -2
  21. package/build/runtime-cjs/lib/config.d.ts +2 -2
  22. package/build/runtime-cjs/lib/types.d.ts +40 -41
  23. package/build/runtime-cjs/lib/types.js +26 -30
  24. package/build/runtime-esm/cache/storage.d.ts +18 -15
  25. package/build/runtime-esm/cache/storage.js +9 -11
  26. package/build/runtime-esm/client/documentStore.d.ts +3 -3
  27. package/build/runtime-esm/client/documentStore.js +0 -1
  28. package/build/runtime-esm/client/index.js +0 -1
  29. package/build/runtime-esm/client/plugins/cache.js +0 -1
  30. package/build/runtime-esm/client/utils/documentPlugins.d.ts +2 -2
  31. package/build/runtime-esm/lib/config.d.ts +2 -2
  32. package/build/runtime-esm/lib/types.d.ts +40 -41
  33. package/build/runtime-esm/lib/types.js +26 -30
  34. package/build/test-cjs/index.js +55 -33
  35. package/build/test-esm/index.js +55 -33
  36. package/build/vite-cjs/index.js +53 -37
  37. package/build/vite-esm/index.js +53 -37
  38. package/package.json +1 -1
@@ -1,9 +1,11 @@
1
- export declare enum CachePolicy {
2
- CacheOrNetwork = "CacheOrNetwork",
3
- CacheOnly = "CacheOnly",
4
- NetworkOnly = "NetworkOnly",
5
- CacheAndNetwork = "CacheAndNetwork"
6
- }
1
+ export declare const CachePolicy: {
2
+ readonly CacheOrNetwork: "CacheOrNetwork";
3
+ readonly CacheOnly: "CacheOnly";
4
+ readonly NetworkOnly: "NetworkOnly";
5
+ readonly CacheAndNetwork: "CacheAndNetwork";
6
+ };
7
+ type ValuesOf<Target> = Target[keyof Target];
8
+ export type CachePolicies = ValuesOf<typeof CachePolicy>;
7
9
  declare global {
8
10
  namespace App {
9
11
  interface Session {
@@ -29,42 +31,38 @@ export type Operation<_Result, _Input> = {
29
31
  };
30
32
  export type Maybe<T> = T | null | undefined;
31
33
  export type DocumentArtifact = FragmentArtifact | QueryArtifact | MutationArtifact | SubscriptionArtifact;
32
- export declare enum ArtifactKind {
33
- Query = "HoudiniQuery",
34
- Subscription = "HoudiniSubscription",
35
- Mutation = "HoudiniMutation",
36
- Fragment = "HoudiniFragment"
37
- }
38
- export declare const CompiledFragmentKind = ArtifactKind.Fragment;
39
- export declare const CompiledMutationKind = ArtifactKind.Mutation;
40
- export declare const CompiledQueryKind = ArtifactKind.Query;
41
- export declare const CompiledSubscriptionKind = ArtifactKind.Subscription;
42
- export type CompiledDocumentKind = ArtifactKind;
43
- export type QueryArtifact = BaseCompiledDocument & {
44
- kind: ArtifactKind.Query;
45
- policy?: CachePolicy;
34
+ export declare const ArtifactKind: {
35
+ readonly Query: "HoudiniQuery";
36
+ readonly Subscription: "HoudiniSubscription";
37
+ readonly Mutation: "HoudiniMutation";
38
+ readonly Fragment: "HoudiniFragment";
39
+ };
40
+ export type ArtifactKinds = ValuesOf<typeof ArtifactKind>;
41
+ export declare const CompiledFragmentKind: "HoudiniFragment";
42
+ export declare const CompiledMutationKind: "HoudiniMutation";
43
+ export declare const CompiledQueryKind: "HoudiniQuery";
44
+ export declare const CompiledSubscriptionKind: "HoudiniSubscription";
45
+ export type CompiledDocumentKind = ArtifactKinds;
46
+ export type QueryArtifact = BaseCompiledDocument<'HoudiniQuery'> & {
47
+ policy?: CachePolicies;
46
48
  partial?: boolean;
47
49
  };
48
- export type MutationArtifact = BaseCompiledDocument & {
49
- kind: ArtifactKind.Mutation;
50
- };
51
- export type FragmentArtifact = BaseCompiledDocument & {
52
- kind: ArtifactKind.Fragment;
53
- };
54
- export type SubscriptionArtifact = BaseCompiledDocument & {
55
- kind: ArtifactKind.Subscription;
50
+ export type MutationArtifact = BaseCompiledDocument<'HoudiniMutation'>;
51
+ export type FragmentArtifact = BaseCompiledDocument<'HoudiniFragment'>;
52
+ export type SubscriptionArtifact = BaseCompiledDocument<'HoudiniSubscription'>;
53
+ export declare const RefetchUpdateMode: {
54
+ readonly append: "append";
55
+ readonly prepend: "prepend";
56
+ readonly replace: "replace";
56
57
  };
57
- export declare enum RefetchUpdateMode {
58
- append = "append",
59
- prepend = "prepend",
60
- replace = "replace"
61
- }
58
+ export type RefetchUpdateModes = ValuesOf<typeof RefetchUpdateMode>;
62
59
  export type InputObject = {
63
60
  fields: Record<string, string>;
64
61
  types: Record<string, Record<string, string>>;
65
62
  };
66
- export type BaseCompiledDocument = {
63
+ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
67
64
  name: string;
65
+ kind: _Kind;
68
66
  raw: string;
69
67
  hash: string;
70
68
  selection: SubscriptionSelection;
@@ -92,20 +90,21 @@ export type ListWhen = {
92
90
  must?: Filter;
93
91
  must_not?: Filter;
94
92
  };
95
- export declare enum DataSource {
93
+ export declare const DataSource: {
96
94
  /**
97
95
  * from the browser cache
98
96
  */
99
- Cache = "cache",
97
+ readonly Cache: "cache";
100
98
  /**
101
99
  * from a browser side `fetch`
102
100
  */
103
- Network = "network",
101
+ readonly Network: "network";
104
102
  /**
105
103
  * from a server side `fetch`
106
104
  */
107
- Ssr = "ssr"
108
- }
105
+ readonly Ssr: "ssr";
106
+ };
107
+ export type DataSources = ValuesOf<typeof DataSource>;
109
108
  export type MutationOperation = {
110
109
  action: 'insert' | 'remove' | 'delete' | 'toggle';
111
110
  list?: string;
@@ -163,7 +162,7 @@ export type SubscriptionSpec = {
163
162
  };
164
163
  export type FetchQueryResult<_Data> = {
165
164
  result: RequestPayload<_Data | null>;
166
- source: DataSource | null;
165
+ source: DataSources | null;
167
166
  };
168
167
  export type QueryResult<_Data = GraphQLObject, _Input = Record<string, any>> = {
169
168
  data: _Data | null;
@@ -173,7 +172,7 @@ export type QueryResult<_Data = GraphQLObject, _Input = Record<string, any>> = {
173
172
  fetching: boolean;
174
173
  partial: boolean;
175
174
  stale: boolean;
176
- source: DataSource | null;
175
+ source: DataSources | null;
177
176
  variables: _Input | null;
178
177
  };
179
178
  export type RequestPayload<GraphQLObject = any> = {
@@ -28,36 +28,32 @@ __export(types_exports, {
28
28
  RefetchUpdateMode: () => RefetchUpdateMode
29
29
  });
30
30
  module.exports = __toCommonJS(types_exports);
31
- var CachePolicy = /* @__PURE__ */ ((CachePolicy2) => {
32
- CachePolicy2["CacheOrNetwork"] = "CacheOrNetwork";
33
- CachePolicy2["CacheOnly"] = "CacheOnly";
34
- CachePolicy2["NetworkOnly"] = "NetworkOnly";
35
- CachePolicy2["CacheAndNetwork"] = "CacheAndNetwork";
36
- return CachePolicy2;
37
- })(CachePolicy || {});
38
- var ArtifactKind = /* @__PURE__ */ ((ArtifactKind2) => {
39
- ArtifactKind2["Query"] = "HoudiniQuery";
40
- ArtifactKind2["Subscription"] = "HoudiniSubscription";
41
- ArtifactKind2["Mutation"] = "HoudiniMutation";
42
- ArtifactKind2["Fragment"] = "HoudiniFragment";
43
- return ArtifactKind2;
44
- })(ArtifactKind || {});
45
- const CompiledFragmentKind = "HoudiniFragment" /* Fragment */;
46
- const CompiledMutationKind = "HoudiniMutation" /* Mutation */;
47
- const CompiledQueryKind = "HoudiniQuery" /* Query */;
48
- const CompiledSubscriptionKind = "HoudiniSubscription" /* Subscription */;
49
- var RefetchUpdateMode = /* @__PURE__ */ ((RefetchUpdateMode2) => {
50
- RefetchUpdateMode2["append"] = "append";
51
- RefetchUpdateMode2["prepend"] = "prepend";
52
- RefetchUpdateMode2["replace"] = "replace";
53
- return RefetchUpdateMode2;
54
- })(RefetchUpdateMode || {});
55
- var DataSource = /* @__PURE__ */ ((DataSource2) => {
56
- DataSource2["Cache"] = "cache";
57
- DataSource2["Network"] = "network";
58
- DataSource2["Ssr"] = "ssr";
59
- return DataSource2;
60
- })(DataSource || {});
31
+ const CachePolicy = {
32
+ CacheOrNetwork: "CacheOrNetwork",
33
+ CacheOnly: "CacheOnly",
34
+ NetworkOnly: "NetworkOnly",
35
+ CacheAndNetwork: "CacheAndNetwork"
36
+ };
37
+ const ArtifactKind = {
38
+ Query: "HoudiniQuery",
39
+ Subscription: "HoudiniSubscription",
40
+ Mutation: "HoudiniMutation",
41
+ Fragment: "HoudiniFragment"
42
+ };
43
+ const CompiledFragmentKind = ArtifactKind.Fragment;
44
+ const CompiledMutationKind = ArtifactKind.Mutation;
45
+ const CompiledQueryKind = ArtifactKind.Query;
46
+ const CompiledSubscriptionKind = ArtifactKind.Subscription;
47
+ const RefetchUpdateMode = {
48
+ append: "append",
49
+ prepend: "prepend",
50
+ replace: "replace"
51
+ };
52
+ const DataSource = {
53
+ Cache: "cache",
54
+ Network: "network",
55
+ Ssr: "ssr"
56
+ };
61
57
  // Annotate the CommonJS export names for ESM import in node:
62
58
  0 && (module.exports = {
63
59
  ArtifactKind,
@@ -7,7 +7,7 @@ export declare class InMemoryStorage {
7
7
  get layerCount(): number;
8
8
  get nextRank(): number;
9
9
  createLayer(optimistic?: boolean): Layer;
10
- insert(id: string, field: string, location: OperationLocation, target: string): void;
10
+ insert(id: string, field: string, location: OperationLocations, target: string): void;
11
11
  remove(id: string, field: string, target: string): void;
12
12
  delete(id: string): void;
13
13
  deleteField(id: string, field: string): void;
@@ -47,7 +47,7 @@ export declare class Layer {
47
47
  removeUndefinedFields(): void;
48
48
  delete(id: string): void;
49
49
  deleteField(id: string, field: string): void;
50
- insert(id: string, field: string, where: OperationLocation, target: string): void;
50
+ insert(id: string, field: string, where: OperationLocations, target: string): void;
51
51
  remove(id: string, field: string, target: string): void;
52
52
  writeLayer(layer: Layer): void;
53
53
  private addFieldOperation;
@@ -71,28 +71,31 @@ type OperationMap = {
71
71
  };
72
72
  type NestedList<_Result = string> = (_Result | null | NestedList<_Result>)[];
73
73
  type InsertOperation = {
74
- kind: OperationKind.insert;
75
- location: OperationLocation;
74
+ kind: 'insert';
75
+ location: OperationLocations;
76
76
  id: string;
77
77
  };
78
78
  type RemoveOperation = {
79
- kind: OperationKind.remove;
79
+ kind: 'remove';
80
80
  id: string;
81
81
  };
82
82
  type DeleteOperation = {
83
- kind: OperationKind.delete;
83
+ kind: 'delete';
84
84
  target: string;
85
85
  };
86
86
  type ListOperation = InsertOperation | RemoveOperation;
87
87
  type Operation = ListOperation | DeleteOperation;
88
- export declare enum OperationLocation {
89
- start = "start",
90
- end = "end"
91
- }
92
- export declare enum OperationKind {
93
- delete = "delete",
94
- insert = "insert",
95
- remove = "remove"
96
- }
88
+ type ValuesOf<Target> = Target[keyof Target];
89
+ export declare const OperationLocation: {
90
+ readonly start: "start";
91
+ readonly end: "end";
92
+ };
93
+ export type OperationLocations = ValuesOf<typeof OperationLocation>;
94
+ export declare const OperationKind: {
95
+ readonly delete: "delete";
96
+ readonly insert: "insert";
97
+ readonly remove: "remove";
98
+ };
99
+ export type OperationKinds = ValuesOf<typeof OperationKind>;
97
100
  export type LayerID = number;
98
101
  export {};
@@ -350,17 +350,15 @@ function isInsertOperation(value) {
350
350
  function isRemoveOperation(value) {
351
351
  return !!value && value.kind === OperationKind.remove;
352
352
  }
353
- var OperationLocation = /* @__PURE__ */ ((OperationLocation2) => {
354
- OperationLocation2["start"] = "start";
355
- OperationLocation2["end"] = "end";
356
- return OperationLocation2;
357
- })(OperationLocation || {});
358
- var OperationKind = /* @__PURE__ */ ((OperationKind2) => {
359
- OperationKind2["delete"] = "delete";
360
- OperationKind2["insert"] = "insert";
361
- OperationKind2["remove"] = "remove";
362
- return OperationKind2;
363
- })(OperationKind || {});
353
+ const OperationLocation = {
354
+ start: "start",
355
+ end: "end"
356
+ };
357
+ const OperationKind = {
358
+ delete: "delete",
359
+ insert: "insert",
360
+ remove: "remove"
361
+ };
364
362
  export {
365
363
  InMemoryStorage,
366
364
  Layer,
@@ -2,7 +2,7 @@ import type { HoudiniClient } from '.';
2
2
  import type { Layer } from '../cache/storage';
3
3
  import type { ConfigFile } from '../lib/config';
4
4
  import { Writable } from '../lib/store';
5
- import type { CachePolicy, DocumentArtifact, QueryResult, GraphQLObject, SubscriptionSpec } from '../lib/types';
5
+ import type { DocumentArtifact, QueryResult, GraphQLObject, SubscriptionSpec, CachePolicies } from '../lib/types';
6
6
  export declare class DocumentStore<_Data extends GraphQLObject, _Input extends Record<string, any>> extends Writable<QueryResult<_Data, _Input>> {
7
7
  #private;
8
8
  constructor({ artifact, plugins, pipeline, client, cache, initialValue, fetching, }: {
@@ -33,7 +33,7 @@ export type ClientPluginContext = {
33
33
  text: string;
34
34
  hash: string;
35
35
  artifact: DocumentArtifact;
36
- policy?: CachePolicy;
36
+ policy?: CachePolicies;
37
37
  fetch?: Fetch;
38
38
  variables?: Record<string, any>;
39
39
  metadata?: App.Metadata | null;
@@ -81,7 +81,7 @@ export type SendParams = {
81
81
  variables?: Record<string, any> | null;
82
82
  metadata?: App.Metadata | null;
83
83
  session?: App.Session | null;
84
- policy?: CachePolicy;
84
+ policy?: CachePolicies;
85
85
  stuff?: Partial<App.Stuff>;
86
86
  cacheParams?: ClientPluginContext['cacheParams'];
87
87
  setup?: boolean;
@@ -178,7 +178,6 @@ class DocumentStore extends Writable {
178
178
  }
179
179
  if (direction === "forward") {
180
180
  if (ctx.setup) {
181
- console.log("going backwards - setup");
182
181
  return this.#step(
183
182
  "backwards",
184
183
  {
@@ -41,7 +41,6 @@ class HoudiniClient {
41
41
  initialValue,
42
42
  fetching = false
43
43
  }) {
44
- console.log("observing", artifact.name, fetching);
45
44
  return new DocumentStore({
46
45
  client: this,
47
46
  artifact,
@@ -49,7 +49,6 @@ const cachePolicy = ({
49
49
  localCache._internal_unstable.collectGarbage();
50
50
  }, 0);
51
51
  }
52
- console.log("cache setting fetch");
53
52
  setFetching(!useCache);
54
53
  return next(ctx);
55
54
  },
@@ -1,3 +1,3 @@
1
- import type { ArtifactKind } from '../../lib/types';
1
+ import type { ArtifactKinds } from '../../lib/types';
2
2
  import type { ClientPlugin, ClientHooks } from '../documentStore';
3
- export declare const documentPlugin: (kind: ArtifactKind, source: () => ClientHooks) => ClientPlugin;
3
+ export declare const documentPlugin: (kind: ArtifactKinds, source: () => ClientHooks) => ClientPlugin;
@@ -1,5 +1,5 @@
1
1
  import type { GraphQLSchema } from 'graphql';
2
- import type { CachePolicy } from './types';
2
+ import type { CachePolicies } from './types';
3
3
  export declare function getMockConfig(): ConfigFile | null;
4
4
  export declare function setMockConfig(config: ConfigFile | null): void;
5
5
  export declare function defaultConfigValues(file: ConfigFile): ConfigFile;
@@ -50,7 +50,7 @@ export type ConfigFile = {
50
50
  /**
51
51
  * The default cache policy to use for queries. For more information: https://www.houdinigraphql.com/guides/caching-data
52
52
  */
53
- defaultCachePolicy?: CachePolicy;
53
+ defaultCachePolicy?: CachePolicies;
54
54
  /**
55
55
  * Specifies whether or not the cache should always use partial data. For more information: https://www.houdinigraphql.com/guides/caching-data#partial-data
56
56
  */
@@ -1,9 +1,11 @@
1
- export declare enum CachePolicy {
2
- CacheOrNetwork = "CacheOrNetwork",
3
- CacheOnly = "CacheOnly",
4
- NetworkOnly = "NetworkOnly",
5
- CacheAndNetwork = "CacheAndNetwork"
6
- }
1
+ export declare const CachePolicy: {
2
+ readonly CacheOrNetwork: "CacheOrNetwork";
3
+ readonly CacheOnly: "CacheOnly";
4
+ readonly NetworkOnly: "NetworkOnly";
5
+ readonly CacheAndNetwork: "CacheAndNetwork";
6
+ };
7
+ type ValuesOf<Target> = Target[keyof Target];
8
+ export type CachePolicies = ValuesOf<typeof CachePolicy>;
7
9
  declare global {
8
10
  namespace App {
9
11
  interface Session {
@@ -29,42 +31,38 @@ export type Operation<_Result, _Input> = {
29
31
  };
30
32
  export type Maybe<T> = T | null | undefined;
31
33
  export type DocumentArtifact = FragmentArtifact | QueryArtifact | MutationArtifact | SubscriptionArtifact;
32
- export declare enum ArtifactKind {
33
- Query = "HoudiniQuery",
34
- Subscription = "HoudiniSubscription",
35
- Mutation = "HoudiniMutation",
36
- Fragment = "HoudiniFragment"
37
- }
38
- export declare const CompiledFragmentKind = ArtifactKind.Fragment;
39
- export declare const CompiledMutationKind = ArtifactKind.Mutation;
40
- export declare const CompiledQueryKind = ArtifactKind.Query;
41
- export declare const CompiledSubscriptionKind = ArtifactKind.Subscription;
42
- export type CompiledDocumentKind = ArtifactKind;
43
- export type QueryArtifact = BaseCompiledDocument & {
44
- kind: ArtifactKind.Query;
45
- policy?: CachePolicy;
34
+ export declare const ArtifactKind: {
35
+ readonly Query: "HoudiniQuery";
36
+ readonly Subscription: "HoudiniSubscription";
37
+ readonly Mutation: "HoudiniMutation";
38
+ readonly Fragment: "HoudiniFragment";
39
+ };
40
+ export type ArtifactKinds = ValuesOf<typeof ArtifactKind>;
41
+ export declare const CompiledFragmentKind: "HoudiniFragment";
42
+ export declare const CompiledMutationKind: "HoudiniMutation";
43
+ export declare const CompiledQueryKind: "HoudiniQuery";
44
+ export declare const CompiledSubscriptionKind: "HoudiniSubscription";
45
+ export type CompiledDocumentKind = ArtifactKinds;
46
+ export type QueryArtifact = BaseCompiledDocument<'HoudiniQuery'> & {
47
+ policy?: CachePolicies;
46
48
  partial?: boolean;
47
49
  };
48
- export type MutationArtifact = BaseCompiledDocument & {
49
- kind: ArtifactKind.Mutation;
50
- };
51
- export type FragmentArtifact = BaseCompiledDocument & {
52
- kind: ArtifactKind.Fragment;
53
- };
54
- export type SubscriptionArtifact = BaseCompiledDocument & {
55
- kind: ArtifactKind.Subscription;
50
+ export type MutationArtifact = BaseCompiledDocument<'HoudiniMutation'>;
51
+ export type FragmentArtifact = BaseCompiledDocument<'HoudiniFragment'>;
52
+ export type SubscriptionArtifact = BaseCompiledDocument<'HoudiniSubscription'>;
53
+ export declare const RefetchUpdateMode: {
54
+ readonly append: "append";
55
+ readonly prepend: "prepend";
56
+ readonly replace: "replace";
56
57
  };
57
- export declare enum RefetchUpdateMode {
58
- append = "append",
59
- prepend = "prepend",
60
- replace = "replace"
61
- }
58
+ export type RefetchUpdateModes = ValuesOf<typeof RefetchUpdateMode>;
62
59
  export type InputObject = {
63
60
  fields: Record<string, string>;
64
61
  types: Record<string, Record<string, string>>;
65
62
  };
66
- export type BaseCompiledDocument = {
63
+ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
67
64
  name: string;
65
+ kind: _Kind;
68
66
  raw: string;
69
67
  hash: string;
70
68
  selection: SubscriptionSelection;
@@ -92,20 +90,21 @@ export type ListWhen = {
92
90
  must?: Filter;
93
91
  must_not?: Filter;
94
92
  };
95
- export declare enum DataSource {
93
+ export declare const DataSource: {
96
94
  /**
97
95
  * from the browser cache
98
96
  */
99
- Cache = "cache",
97
+ readonly Cache: "cache";
100
98
  /**
101
99
  * from a browser side `fetch`
102
100
  */
103
- Network = "network",
101
+ readonly Network: "network";
104
102
  /**
105
103
  * from a server side `fetch`
106
104
  */
107
- Ssr = "ssr"
108
- }
105
+ readonly Ssr: "ssr";
106
+ };
107
+ export type DataSources = ValuesOf<typeof DataSource>;
109
108
  export type MutationOperation = {
110
109
  action: 'insert' | 'remove' | 'delete' | 'toggle';
111
110
  list?: string;
@@ -163,7 +162,7 @@ export type SubscriptionSpec = {
163
162
  };
164
163
  export type FetchQueryResult<_Data> = {
165
164
  result: RequestPayload<_Data | null>;
166
- source: DataSource | null;
165
+ source: DataSources | null;
167
166
  };
168
167
  export type QueryResult<_Data = GraphQLObject, _Input = Record<string, any>> = {
169
168
  data: _Data | null;
@@ -173,7 +172,7 @@ export type QueryResult<_Data = GraphQLObject, _Input = Record<string, any>> = {
173
172
  fetching: boolean;
174
173
  partial: boolean;
175
174
  stale: boolean;
176
- source: DataSource | null;
175
+ source: DataSources | null;
177
176
  variables: _Input | null;
178
177
  };
179
178
  export type RequestPayload<GraphQLObject = any> = {
@@ -1,33 +1,29 @@
1
- var CachePolicy = /* @__PURE__ */ ((CachePolicy2) => {
2
- CachePolicy2["CacheOrNetwork"] = "CacheOrNetwork";
3
- CachePolicy2["CacheOnly"] = "CacheOnly";
4
- CachePolicy2["NetworkOnly"] = "NetworkOnly";
5
- CachePolicy2["CacheAndNetwork"] = "CacheAndNetwork";
6
- return CachePolicy2;
7
- })(CachePolicy || {});
8
- var ArtifactKind = /* @__PURE__ */ ((ArtifactKind2) => {
9
- ArtifactKind2["Query"] = "HoudiniQuery";
10
- ArtifactKind2["Subscription"] = "HoudiniSubscription";
11
- ArtifactKind2["Mutation"] = "HoudiniMutation";
12
- ArtifactKind2["Fragment"] = "HoudiniFragment";
13
- return ArtifactKind2;
14
- })(ArtifactKind || {});
15
- const CompiledFragmentKind = "HoudiniFragment" /* Fragment */;
16
- const CompiledMutationKind = "HoudiniMutation" /* Mutation */;
17
- const CompiledQueryKind = "HoudiniQuery" /* Query */;
18
- const CompiledSubscriptionKind = "HoudiniSubscription" /* Subscription */;
19
- var RefetchUpdateMode = /* @__PURE__ */ ((RefetchUpdateMode2) => {
20
- RefetchUpdateMode2["append"] = "append";
21
- RefetchUpdateMode2["prepend"] = "prepend";
22
- RefetchUpdateMode2["replace"] = "replace";
23
- return RefetchUpdateMode2;
24
- })(RefetchUpdateMode || {});
25
- var DataSource = /* @__PURE__ */ ((DataSource2) => {
26
- DataSource2["Cache"] = "cache";
27
- DataSource2["Network"] = "network";
28
- DataSource2["Ssr"] = "ssr";
29
- return DataSource2;
30
- })(DataSource || {});
1
+ const CachePolicy = {
2
+ CacheOrNetwork: "CacheOrNetwork",
3
+ CacheOnly: "CacheOnly",
4
+ NetworkOnly: "NetworkOnly",
5
+ CacheAndNetwork: "CacheAndNetwork"
6
+ };
7
+ const ArtifactKind = {
8
+ Query: "HoudiniQuery",
9
+ Subscription: "HoudiniSubscription",
10
+ Mutation: "HoudiniMutation",
11
+ Fragment: "HoudiniFragment"
12
+ };
13
+ const CompiledFragmentKind = ArtifactKind.Fragment;
14
+ const CompiledMutationKind = ArtifactKind.Mutation;
15
+ const CompiledQueryKind = ArtifactKind.Query;
16
+ const CompiledSubscriptionKind = ArtifactKind.Subscription;
17
+ const RefetchUpdateMode = {
18
+ append: "append",
19
+ prepend: "prepend",
20
+ replace: "replace"
21
+ };
22
+ const DataSource = {
23
+ Cache: "cache",
24
+ Network: "network",
25
+ Ssr: "ssr"
26
+ };
31
27
  export {
32
28
  ArtifactKind,
33
29
  CachePolicy,