houdini-svelte 1.0.0 → 1.0.2
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.
- package/build/plugin-cjs/index.js +53 -20
- package/build/plugin-esm/index.js +53 -20
- package/build/preprocess-cjs/index.js +8 -8
- package/build/preprocess-esm/index.js +8 -8
- package/build/runtime/stores/fragment.d.ts +2 -5
- package/build/runtime/stores/pagination/cursor.d.ts +2 -20
- package/build/runtime/stores/pagination/fragment.d.ts +2 -14
- package/build/runtime/stores/pagination/offset.d.ts +0 -9
- package/build/runtime/stores/pagination/query.d.ts +2 -3
- package/build/runtime/types.d.ts +51 -1
- package/build/runtime-cjs/stores/fragment.d.ts +2 -5
- package/build/runtime-cjs/stores/pagination/cursor.d.ts +2 -20
- package/build/runtime-cjs/stores/pagination/cursor.js +1 -1
- package/build/runtime-cjs/stores/pagination/fragment.d.ts +2 -14
- package/build/runtime-cjs/stores/pagination/offset.d.ts +0 -9
- package/build/runtime-cjs/stores/pagination/query.d.ts +2 -3
- package/build/runtime-cjs/types.d.ts +51 -1
- package/build/runtime-esm/stores/fragment.d.ts +2 -5
- package/build/runtime-esm/stores/pagination/cursor.d.ts +2 -20
- package/build/runtime-esm/stores/pagination/cursor.js +1 -1
- package/build/runtime-esm/stores/pagination/fragment.d.ts +2 -14
- package/build/runtime-esm/stores/pagination/offset.d.ts +0 -9
- package/build/runtime-esm/stores/pagination/query.d.ts +2 -3
- package/build/runtime-esm/types.d.ts +51 -1
- package/build/test-cjs/index.js +153 -77
- package/build/test-esm/index.js +153 -77
- package/package.json +2 -2
|
@@ -100066,7 +100066,7 @@ var require_definition3 = __commonJS3({
|
|
|
100066
100066
|
exports.assertInterfaceType = assertInterfaceType;
|
|
100067
100067
|
exports.isUnionType = isUnionType13;
|
|
100068
100068
|
exports.assertUnionType = assertUnionType;
|
|
100069
|
-
exports.isEnumType =
|
|
100069
|
+
exports.isEnumType = isEnumType12;
|
|
100070
100070
|
exports.assertEnumType = assertEnumType;
|
|
100071
100071
|
exports.isInputObjectType = isInputObjectType8;
|
|
100072
100072
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -100137,7 +100137,7 @@ var require_definition3 = __commonJS3({
|
|
|
100137
100137
|
return Constructor;
|
|
100138
100138
|
}
|
|
100139
100139
|
function isType(type) {
|
|
100140
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100140
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
100141
100141
|
}
|
|
100142
100142
|
function assertType(type) {
|
|
100143
100143
|
if (!isType(type)) {
|
|
@@ -100181,11 +100181,11 @@ var require_definition3 = __commonJS3({
|
|
|
100181
100181
|
}
|
|
100182
100182
|
return type;
|
|
100183
100183
|
}
|
|
100184
|
-
function
|
|
100184
|
+
function isEnumType12(type) {
|
|
100185
100185
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
100186
100186
|
}
|
|
100187
100187
|
function assertEnumType(type) {
|
|
100188
|
-
if (!
|
|
100188
|
+
if (!isEnumType12(type)) {
|
|
100189
100189
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
100190
100190
|
}
|
|
100191
100191
|
return type;
|
|
@@ -100218,7 +100218,7 @@ var require_definition3 = __commonJS3({
|
|
|
100218
100218
|
return type;
|
|
100219
100219
|
}
|
|
100220
100220
|
function isInputType(type) {
|
|
100221
|
-
return isScalarType13(type) ||
|
|
100221
|
+
return isScalarType13(type) || isEnumType12(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
100222
100222
|
}
|
|
100223
100223
|
function assertInputType(type) {
|
|
100224
100224
|
if (!isInputType(type)) {
|
|
@@ -100227,7 +100227,7 @@ var require_definition3 = __commonJS3({
|
|
|
100227
100227
|
return type;
|
|
100228
100228
|
}
|
|
100229
100229
|
function isOutputType(type) {
|
|
100230
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100230
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
100231
100231
|
}
|
|
100232
100232
|
function assertOutputType(type) {
|
|
100233
100233
|
if (!isOutputType(type)) {
|
|
@@ -100236,7 +100236,7 @@ var require_definition3 = __commonJS3({
|
|
|
100236
100236
|
return type;
|
|
100237
100237
|
}
|
|
100238
100238
|
function isLeafType4(type) {
|
|
100239
|
-
return isScalarType13(type) ||
|
|
100239
|
+
return isScalarType13(type) || isEnumType12(type);
|
|
100240
100240
|
}
|
|
100241
100241
|
function assertLeafType(type) {
|
|
100242
100242
|
if (!isLeafType4(type)) {
|
|
@@ -100324,7 +100324,7 @@ var require_definition3 = __commonJS3({
|
|
|
100324
100324
|
}
|
|
100325
100325
|
}
|
|
100326
100326
|
function isNamedType4(type) {
|
|
100327
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100327
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type);
|
|
100328
100328
|
}
|
|
100329
100329
|
function assertNamedType(type) {
|
|
100330
100330
|
if (!isNamedType4(type)) {
|
|
@@ -186275,21 +186275,56 @@ async function fragmentTypedefs(input) {
|
|
|
186275
186275
|
document_input.typeAnnotation = AST15.tsTypeAnnotation(
|
|
186276
186276
|
AST15.tsTypeReference(AST15.identifier(store))
|
|
186277
186277
|
);
|
|
186278
|
-
|
|
186279
|
-
|
|
186280
|
-
|
|
186281
|
-
|
|
186282
|
-
|
|
186283
|
-
|
|
186284
|
-
|
|
186285
|
-
|
|
186286
|
-
|
|
186278
|
+
let store_type = "FragmentStoreInstance";
|
|
186279
|
+
if (doc.refetch?.paginated) {
|
|
186280
|
+
if (doc.refetch.method === "cursor") {
|
|
186281
|
+
store_type = "CursorFragmentStoreInstance";
|
|
186282
|
+
} else {
|
|
186283
|
+
store_type = "OffsetFragmentStoreInstance";
|
|
186284
|
+
}
|
|
186285
|
+
}
|
|
186286
|
+
ensureImports({
|
|
186287
|
+
config: input.config,
|
|
186288
|
+
body: contents.script.body,
|
|
186289
|
+
sourceModule: "./types",
|
|
186290
|
+
import: [store_type],
|
|
186291
|
+
importKind: "type"
|
|
186292
|
+
});
|
|
186287
186293
|
ensureImports({
|
|
186288
186294
|
config: input.config,
|
|
186289
186295
|
body: contents.script.body,
|
|
186290
186296
|
sourceModule: import_path,
|
|
186291
186297
|
import: [store]
|
|
186292
186298
|
});
|
|
186299
|
+
const shapeID = `${doc.name}$data`;
|
|
186300
|
+
const inputID = `${doc.name}$input`;
|
|
186301
|
+
ensureImports({
|
|
186302
|
+
config: input.config,
|
|
186303
|
+
body: contents.script.body,
|
|
186304
|
+
sourceModule: "../../../artifacts/" + doc.name,
|
|
186305
|
+
import: [inputID, shapeID]
|
|
186306
|
+
});
|
|
186307
|
+
const typeParams = [];
|
|
186308
|
+
if (doc.refetch?.paginated) {
|
|
186309
|
+
typeParams.push(AST15.tsTypeReference(AST15.identifier(inputID)));
|
|
186310
|
+
}
|
|
186311
|
+
const return_value = AST15.tsTypeReference(
|
|
186312
|
+
AST15.identifier(store_type),
|
|
186313
|
+
AST15.tsTypeParameterInstantiation([
|
|
186314
|
+
AST15.tsTypeReference(AST15.identifier(shapeID)),
|
|
186315
|
+
...typeParams
|
|
186316
|
+
])
|
|
186317
|
+
);
|
|
186318
|
+
const null_return_value = AST15.tsTypeReference(
|
|
186319
|
+
AST15.identifier(store_type),
|
|
186320
|
+
AST15.tsTypeParameterInstantiation([
|
|
186321
|
+
AST15.tsUnionType([
|
|
186322
|
+
AST15.tsTypeReference(AST15.identifier(shapeID)),
|
|
186323
|
+
AST15.tsNullKeyword()
|
|
186324
|
+
]),
|
|
186325
|
+
...typeParams
|
|
186326
|
+
])
|
|
186327
|
+
);
|
|
186293
186328
|
return [
|
|
186294
186329
|
AST15.exportNamedDeclaration(
|
|
186295
186330
|
AST15.tsDeclareFunction(
|
|
@@ -186302,9 +186337,7 @@ async function fragmentTypedefs(input) {
|
|
|
186302
186337
|
AST15.tsDeclareFunction(
|
|
186303
186338
|
AST15.identifier(which),
|
|
186304
186339
|
[initial_value_or_null_input, document_input],
|
|
186305
|
-
AST15.tsTypeAnnotation(
|
|
186306
|
-
AST15.tsUnionType([return_value, AST15.tsNullKeyword()])
|
|
186307
|
-
)
|
|
186340
|
+
AST15.tsTypeAnnotation(null_return_value)
|
|
186308
186341
|
)
|
|
186309
186342
|
)
|
|
186310
186343
|
];
|
|
@@ -100060,7 +100060,7 @@ var require_definition3 = __commonJS3({
|
|
|
100060
100060
|
exports.assertInterfaceType = assertInterfaceType;
|
|
100061
100061
|
exports.isUnionType = isUnionType13;
|
|
100062
100062
|
exports.assertUnionType = assertUnionType;
|
|
100063
|
-
exports.isEnumType =
|
|
100063
|
+
exports.isEnumType = isEnumType12;
|
|
100064
100064
|
exports.assertEnumType = assertEnumType;
|
|
100065
100065
|
exports.isInputObjectType = isInputObjectType8;
|
|
100066
100066
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -100131,7 +100131,7 @@ var require_definition3 = __commonJS3({
|
|
|
100131
100131
|
return Constructor;
|
|
100132
100132
|
}
|
|
100133
100133
|
function isType(type) {
|
|
100134
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100134
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
100135
100135
|
}
|
|
100136
100136
|
function assertType(type) {
|
|
100137
100137
|
if (!isType(type)) {
|
|
@@ -100175,11 +100175,11 @@ var require_definition3 = __commonJS3({
|
|
|
100175
100175
|
}
|
|
100176
100176
|
return type;
|
|
100177
100177
|
}
|
|
100178
|
-
function
|
|
100178
|
+
function isEnumType12(type) {
|
|
100179
100179
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
100180
100180
|
}
|
|
100181
100181
|
function assertEnumType(type) {
|
|
100182
|
-
if (!
|
|
100182
|
+
if (!isEnumType12(type)) {
|
|
100183
100183
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
100184
100184
|
}
|
|
100185
100185
|
return type;
|
|
@@ -100212,7 +100212,7 @@ var require_definition3 = __commonJS3({
|
|
|
100212
100212
|
return type;
|
|
100213
100213
|
}
|
|
100214
100214
|
function isInputType(type) {
|
|
100215
|
-
return isScalarType13(type) ||
|
|
100215
|
+
return isScalarType13(type) || isEnumType12(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
100216
100216
|
}
|
|
100217
100217
|
function assertInputType(type) {
|
|
100218
100218
|
if (!isInputType(type)) {
|
|
@@ -100221,7 +100221,7 @@ var require_definition3 = __commonJS3({
|
|
|
100221
100221
|
return type;
|
|
100222
100222
|
}
|
|
100223
100223
|
function isOutputType(type) {
|
|
100224
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100224
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
100225
100225
|
}
|
|
100226
100226
|
function assertOutputType(type) {
|
|
100227
100227
|
if (!isOutputType(type)) {
|
|
@@ -100230,7 +100230,7 @@ var require_definition3 = __commonJS3({
|
|
|
100230
100230
|
return type;
|
|
100231
100231
|
}
|
|
100232
100232
|
function isLeafType4(type) {
|
|
100233
|
-
return isScalarType13(type) ||
|
|
100233
|
+
return isScalarType13(type) || isEnumType12(type);
|
|
100234
100234
|
}
|
|
100235
100235
|
function assertLeafType(type) {
|
|
100236
100236
|
if (!isLeafType4(type)) {
|
|
@@ -100318,7 +100318,7 @@ var require_definition3 = __commonJS3({
|
|
|
100318
100318
|
}
|
|
100319
100319
|
}
|
|
100320
100320
|
function isNamedType4(type) {
|
|
100321
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
100321
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type);
|
|
100322
100322
|
}
|
|
100323
100323
|
function assertNamedType(type) {
|
|
100324
100324
|
if (!isNamedType4(type)) {
|
|
@@ -186269,21 +186269,56 @@ async function fragmentTypedefs(input) {
|
|
|
186269
186269
|
document_input.typeAnnotation = AST15.tsTypeAnnotation(
|
|
186270
186270
|
AST15.tsTypeReference(AST15.identifier(store))
|
|
186271
186271
|
);
|
|
186272
|
-
|
|
186273
|
-
|
|
186274
|
-
|
|
186275
|
-
|
|
186276
|
-
|
|
186277
|
-
|
|
186278
|
-
|
|
186279
|
-
|
|
186280
|
-
|
|
186272
|
+
let store_type = "FragmentStoreInstance";
|
|
186273
|
+
if (doc.refetch?.paginated) {
|
|
186274
|
+
if (doc.refetch.method === "cursor") {
|
|
186275
|
+
store_type = "CursorFragmentStoreInstance";
|
|
186276
|
+
} else {
|
|
186277
|
+
store_type = "OffsetFragmentStoreInstance";
|
|
186278
|
+
}
|
|
186279
|
+
}
|
|
186280
|
+
ensureImports({
|
|
186281
|
+
config: input.config,
|
|
186282
|
+
body: contents.script.body,
|
|
186283
|
+
sourceModule: "./types",
|
|
186284
|
+
import: [store_type],
|
|
186285
|
+
importKind: "type"
|
|
186286
|
+
});
|
|
186281
186287
|
ensureImports({
|
|
186282
186288
|
config: input.config,
|
|
186283
186289
|
body: contents.script.body,
|
|
186284
186290
|
sourceModule: import_path,
|
|
186285
186291
|
import: [store]
|
|
186286
186292
|
});
|
|
186293
|
+
const shapeID = `${doc.name}$data`;
|
|
186294
|
+
const inputID = `${doc.name}$input`;
|
|
186295
|
+
ensureImports({
|
|
186296
|
+
config: input.config,
|
|
186297
|
+
body: contents.script.body,
|
|
186298
|
+
sourceModule: "../../../artifacts/" + doc.name,
|
|
186299
|
+
import: [inputID, shapeID]
|
|
186300
|
+
});
|
|
186301
|
+
const typeParams = [];
|
|
186302
|
+
if (doc.refetch?.paginated) {
|
|
186303
|
+
typeParams.push(AST15.tsTypeReference(AST15.identifier(inputID)));
|
|
186304
|
+
}
|
|
186305
|
+
const return_value = AST15.tsTypeReference(
|
|
186306
|
+
AST15.identifier(store_type),
|
|
186307
|
+
AST15.tsTypeParameterInstantiation([
|
|
186308
|
+
AST15.tsTypeReference(AST15.identifier(shapeID)),
|
|
186309
|
+
...typeParams
|
|
186310
|
+
])
|
|
186311
|
+
);
|
|
186312
|
+
const null_return_value = AST15.tsTypeReference(
|
|
186313
|
+
AST15.identifier(store_type),
|
|
186314
|
+
AST15.tsTypeParameterInstantiation([
|
|
186315
|
+
AST15.tsUnionType([
|
|
186316
|
+
AST15.tsTypeReference(AST15.identifier(shapeID)),
|
|
186317
|
+
AST15.tsNullKeyword()
|
|
186318
|
+
]),
|
|
186319
|
+
...typeParams
|
|
186320
|
+
])
|
|
186321
|
+
);
|
|
186287
186322
|
return [
|
|
186288
186323
|
AST15.exportNamedDeclaration(
|
|
186289
186324
|
AST15.tsDeclareFunction(
|
|
@@ -186296,9 +186331,7 @@ async function fragmentTypedefs(input) {
|
|
|
186296
186331
|
AST15.tsDeclareFunction(
|
|
186297
186332
|
AST15.identifier(which),
|
|
186298
186333
|
[initial_value_or_null_input, document_input],
|
|
186299
|
-
AST15.tsTypeAnnotation(
|
|
186300
|
-
AST15.tsUnionType([return_value, AST15.tsNullKeyword()])
|
|
186301
|
-
)
|
|
186334
|
+
AST15.tsTypeAnnotation(null_return_value)
|
|
186302
186335
|
)
|
|
186303
186336
|
)
|
|
186304
186337
|
];
|
|
@@ -131930,7 +131930,7 @@ var require_definition2 = __commonJS3({
|
|
|
131930
131930
|
exports.assertInterfaceType = assertInterfaceType;
|
|
131931
131931
|
exports.isUnionType = isUnionType13;
|
|
131932
131932
|
exports.assertUnionType = assertUnionType;
|
|
131933
|
-
exports.isEnumType =
|
|
131933
|
+
exports.isEnumType = isEnumType12;
|
|
131934
131934
|
exports.assertEnumType = assertEnumType;
|
|
131935
131935
|
exports.isInputObjectType = isInputObjectType8;
|
|
131936
131936
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -132001,7 +132001,7 @@ var require_definition2 = __commonJS3({
|
|
|
132001
132001
|
return Constructor;
|
|
132002
132002
|
}
|
|
132003
132003
|
function isType(type) {
|
|
132004
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
132004
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
132005
132005
|
}
|
|
132006
132006
|
function assertType(type) {
|
|
132007
132007
|
if (!isType(type)) {
|
|
@@ -132045,11 +132045,11 @@ var require_definition2 = __commonJS3({
|
|
|
132045
132045
|
}
|
|
132046
132046
|
return type;
|
|
132047
132047
|
}
|
|
132048
|
-
function
|
|
132048
|
+
function isEnumType12(type) {
|
|
132049
132049
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
132050
132050
|
}
|
|
132051
132051
|
function assertEnumType(type) {
|
|
132052
|
-
if (!
|
|
132052
|
+
if (!isEnumType12(type)) {
|
|
132053
132053
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
132054
132054
|
}
|
|
132055
132055
|
return type;
|
|
@@ -132082,7 +132082,7 @@ var require_definition2 = __commonJS3({
|
|
|
132082
132082
|
return type;
|
|
132083
132083
|
}
|
|
132084
132084
|
function isInputType(type) {
|
|
132085
|
-
return isScalarType13(type) ||
|
|
132085
|
+
return isScalarType13(type) || isEnumType12(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
132086
132086
|
}
|
|
132087
132087
|
function assertInputType(type) {
|
|
132088
132088
|
if (!isInputType(type)) {
|
|
@@ -132091,7 +132091,7 @@ var require_definition2 = __commonJS3({
|
|
|
132091
132091
|
return type;
|
|
132092
132092
|
}
|
|
132093
132093
|
function isOutputType(type) {
|
|
132094
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
132094
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
132095
132095
|
}
|
|
132096
132096
|
function assertOutputType(type) {
|
|
132097
132097
|
if (!isOutputType(type)) {
|
|
@@ -132100,7 +132100,7 @@ var require_definition2 = __commonJS3({
|
|
|
132100
132100
|
return type;
|
|
132101
132101
|
}
|
|
132102
132102
|
function isLeafType4(type) {
|
|
132103
|
-
return isScalarType13(type) ||
|
|
132103
|
+
return isScalarType13(type) || isEnumType12(type);
|
|
132104
132104
|
}
|
|
132105
132105
|
function assertLeafType(type) {
|
|
132106
132106
|
if (!isLeafType4(type)) {
|
|
@@ -132188,7 +132188,7 @@ var require_definition2 = __commonJS3({
|
|
|
132188
132188
|
}
|
|
132189
132189
|
}
|
|
132190
132190
|
function isNamedType4(type) {
|
|
132191
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
132191
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type);
|
|
132192
132192
|
}
|
|
132193
132193
|
function assertNamedType(type) {
|
|
132194
132194
|
if (!isNamedType4(type)) {
|
|
@@ -131922,7 +131922,7 @@ var require_definition2 = __commonJS3({
|
|
|
131922
131922
|
exports.assertInterfaceType = assertInterfaceType;
|
|
131923
131923
|
exports.isUnionType = isUnionType13;
|
|
131924
131924
|
exports.assertUnionType = assertUnionType;
|
|
131925
|
-
exports.isEnumType =
|
|
131925
|
+
exports.isEnumType = isEnumType12;
|
|
131926
131926
|
exports.assertEnumType = assertEnumType;
|
|
131927
131927
|
exports.isInputObjectType = isInputObjectType8;
|
|
131928
131928
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -131993,7 +131993,7 @@ var require_definition2 = __commonJS3({
|
|
|
131993
131993
|
return Constructor;
|
|
131994
131994
|
}
|
|
131995
131995
|
function isType(type) {
|
|
131996
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
131996
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
131997
131997
|
}
|
|
131998
131998
|
function assertType(type) {
|
|
131999
131999
|
if (!isType(type)) {
|
|
@@ -132037,11 +132037,11 @@ var require_definition2 = __commonJS3({
|
|
|
132037
132037
|
}
|
|
132038
132038
|
return type;
|
|
132039
132039
|
}
|
|
132040
|
-
function
|
|
132040
|
+
function isEnumType12(type) {
|
|
132041
132041
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
132042
132042
|
}
|
|
132043
132043
|
function assertEnumType(type) {
|
|
132044
|
-
if (!
|
|
132044
|
+
if (!isEnumType12(type)) {
|
|
132045
132045
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
132046
132046
|
}
|
|
132047
132047
|
return type;
|
|
@@ -132074,7 +132074,7 @@ var require_definition2 = __commonJS3({
|
|
|
132074
132074
|
return type;
|
|
132075
132075
|
}
|
|
132076
132076
|
function isInputType(type) {
|
|
132077
|
-
return isScalarType13(type) ||
|
|
132077
|
+
return isScalarType13(type) || isEnumType12(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
132078
132078
|
}
|
|
132079
132079
|
function assertInputType(type) {
|
|
132080
132080
|
if (!isInputType(type)) {
|
|
@@ -132083,7 +132083,7 @@ var require_definition2 = __commonJS3({
|
|
|
132083
132083
|
return type;
|
|
132084
132084
|
}
|
|
132085
132085
|
function isOutputType(type) {
|
|
132086
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
132086
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
132087
132087
|
}
|
|
132088
132088
|
function assertOutputType(type) {
|
|
132089
132089
|
if (!isOutputType(type)) {
|
|
@@ -132092,7 +132092,7 @@ var require_definition2 = __commonJS3({
|
|
|
132092
132092
|
return type;
|
|
132093
132093
|
}
|
|
132094
132094
|
function isLeafType4(type) {
|
|
132095
|
-
return isScalarType13(type) ||
|
|
132095
|
+
return isScalarType13(type) || isEnumType12(type);
|
|
132096
132096
|
}
|
|
132097
132097
|
function assertLeafType(type) {
|
|
132098
132098
|
if (!isLeafType4(type)) {
|
|
@@ -132180,7 +132180,7 @@ var require_definition2 = __commonJS3({
|
|
|
132180
132180
|
}
|
|
132181
132181
|
}
|
|
132182
132182
|
function isNamedType4(type) {
|
|
132183
|
-
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) ||
|
|
132183
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType12(type) || isInputObjectType8(type);
|
|
132184
132184
|
}
|
|
132185
132185
|
function assertNamedType(type) {
|
|
132186
132186
|
if (!isNamedType4(type)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GraphQLObject, FragmentArtifact, HoudiniFetchContext } from '$houdini/runtime/lib/types';
|
|
2
|
+
import type { FragmentStoreInstance } from '../types';
|
|
2
3
|
export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
3
4
|
artifact: FragmentArtifact;
|
|
4
5
|
name: string;
|
|
@@ -8,9 +9,5 @@ export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
|
8
9
|
artifact: FragmentArtifact;
|
|
9
10
|
storeName: string;
|
|
10
11
|
});
|
|
11
|
-
get(initialValue: _Data | null):
|
|
12
|
-
kind: "HoudiniFragment";
|
|
13
|
-
subscribe: (run: import("svelte/store").Subscriber<_Data | null>, invalidate?: ((value?: _Data | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
14
|
-
update: (val: _Data | null) => void;
|
|
15
|
-
};
|
|
12
|
+
get(initialValue: _Data | null): FragmentStoreInstance<_Data | null>;
|
|
16
13
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
2
|
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
3
|
-
import type { GraphQLObject, QueryArtifact
|
|
4
|
-
import type {
|
|
5
|
-
import type { QueryStoreFetchParams } from '../query';
|
|
3
|
+
import type { GraphQLObject, QueryArtifact } from '$houdini/runtime/lib/types';
|
|
4
|
+
import type { CursorHandlers } from '../../types';
|
|
6
5
|
import type { FetchFn } from './fetch';
|
|
7
|
-
import type { PageInfo } from './pageInfo';
|
|
8
6
|
export declare function cursorHandlers<_Data extends GraphQLObject, _Input extends Record<string, any>>({ artifact, storeName, observer, fetchUpdate: parentFetchUpdate, fetch: parentFetch, }: {
|
|
9
7
|
artifact: QueryArtifact;
|
|
10
8
|
storeName: string;
|
|
@@ -12,19 +10,3 @@ export declare function cursorHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
12
10
|
fetch: FetchFn<_Data, _Input>;
|
|
13
11
|
fetchUpdate: (arg: SendParams, updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
|
|
14
12
|
}): CursorHandlers<_Data, _Input>;
|
|
15
|
-
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
16
|
-
loadNextPage: (args?: {
|
|
17
|
-
first?: number;
|
|
18
|
-
after?: string;
|
|
19
|
-
fetch?: typeof globalThis.fetch;
|
|
20
|
-
metadata: {};
|
|
21
|
-
}) => Promise<void>;
|
|
22
|
-
loadPreviousPage: (args?: {
|
|
23
|
-
last?: number;
|
|
24
|
-
before?: string;
|
|
25
|
-
fetch?: typeof globalThis.fetch;
|
|
26
|
-
metadata?: {};
|
|
27
|
-
}) => Promise<void>;
|
|
28
|
-
pageInfo: Writable<PageInfo>;
|
|
29
|
-
fetch(args?: QueryStoreFetchParams<_Data, _Input> | undefined): Promise<QueryResult<_Data, _Input>>;
|
|
30
|
-
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
2
|
import type { FragmentArtifact, GraphQLObject, HoudiniFetchContext, QueryArtifact } from '$houdini/runtime/lib/types';
|
|
3
3
|
import type { Readable, Subscriber } from 'svelte/store';
|
|
4
|
+
import type { CursorHandlers, OffsetFragmentStoreInstance } from '../../types';
|
|
4
5
|
import type { StoreConfig } from '../query';
|
|
5
|
-
import type { CursorHandlers } from './cursor';
|
|
6
6
|
import { type PageInfo } from './pageInfo';
|
|
7
7
|
type FragmentStoreConfig<_Data extends GraphQLObject, _Input> = StoreConfig<_Data, _Input, FragmentArtifact> & {
|
|
8
8
|
paginationArtifact: QueryArtifact;
|
|
@@ -43,19 +43,7 @@ export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input ext
|
|
|
43
43
|
protected storeHandlers(observer: DocumentStore<_Data, _Input>): CursorHandlers<_Data, _Input>;
|
|
44
44
|
}
|
|
45
45
|
export declare class FragmentStoreOffset<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
46
|
-
get(initialValue: _Data | null):
|
|
47
|
-
kind: "HoudiniFragment";
|
|
48
|
-
data: Readable<_Data | null>;
|
|
49
|
-
subscribe: (run: import("$houdini/runtime/lib").Subscriber<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>, invalidate?: (value?: import("$houdini/runtime/lib/types").QueryResult<_Data, _Input> | undefined) => void) => import("$houdini/runtime/lib").Unsubscriber;
|
|
50
|
-
fetch: (args?: import("../query").QueryStoreFetchParams<_Data, _Input> | undefined) => Promise<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>;
|
|
51
|
-
loadNextPage: ({ limit, offset, fetch, metadata, }?: {
|
|
52
|
-
limit?: number | undefined;
|
|
53
|
-
offset?: number | undefined;
|
|
54
|
-
fetch?: typeof fetch | undefined;
|
|
55
|
-
metadata?: {} | undefined;
|
|
56
|
-
}) => Promise<void>;
|
|
57
|
-
fetching: Readable<boolean>;
|
|
58
|
-
};
|
|
46
|
+
get(initialValue: _Data | null): OffsetFragmentStoreInstance<_Data, _Input>;
|
|
59
47
|
}
|
|
60
48
|
export type FragmentStorePaginated<_Data extends GraphQLObject, _Input> = Readable<{
|
|
61
49
|
data: _Data;
|
|
@@ -18,12 +18,3 @@ export declare function offsetHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
18
18
|
}) => Promise<void>;
|
|
19
19
|
fetch(args?: QueryStoreFetchParams<_Data, _Input>): Promise<QueryResult<_Data, _Input>>;
|
|
20
20
|
};
|
|
21
|
-
export type OffsetHandlers<_Data extends GraphQLObject, _Input, _ReturnType> = {
|
|
22
|
-
loadNextPage: (args?: {
|
|
23
|
-
limit?: number;
|
|
24
|
-
offset?: number;
|
|
25
|
-
metadata?: {};
|
|
26
|
-
fetch?: typeof globalThis.fetch;
|
|
27
|
-
}) => Promise<void>;
|
|
28
|
-
fetch(args?: QueryStoreFetchParams<_Data, _Input> | undefined): Promise<_ReturnType>;
|
|
29
|
-
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { GraphQLObject, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
2
2
|
import type { Subscriber } from 'svelte/store';
|
|
3
|
+
import type { CursorHandlers, OffsetHandlers } from '../../types';
|
|
3
4
|
import type { ClientFetchParams, LoadEventFetchParams, QueryStoreFetchParams, RequestEventFetchParams, StoreConfig } from '../query';
|
|
4
5
|
import { QueryStore } from '../query';
|
|
5
|
-
import type { CursorHandlers } from './cursor';
|
|
6
|
-
import type { OffsetHandlers } from './offset';
|
|
7
6
|
import { type PageInfo } from './pageInfo';
|
|
8
7
|
export type CursorStoreResult<_Data extends GraphQLObject, _Input extends {}> = QueryResult<_Data, _Input> & {
|
|
9
8
|
pageInfo: PageInfo;
|
|
@@ -23,7 +22,7 @@ export declare class QueryStoreCursor<_Data extends GraphQLObject, _Input extend
|
|
|
23
22
|
export declare class QueryStoreOffset<_Data extends GraphQLObject, _Input extends {}> extends QueryStore<_Data, _Input> {
|
|
24
23
|
#private;
|
|
25
24
|
paginated: boolean;
|
|
26
|
-
loadNextPage(args?: Parameters<OffsetHandlers<_Data, _Input
|
|
25
|
+
loadNextPage(args?: Parameters<OffsetHandlers<_Data, _Input>['loadNextPage']>[0]): Promise<void>;
|
|
27
26
|
fetch(params?: RequestEventFetchParams<_Data, _Input>): Promise<QueryResult<_Data, _Input>>;
|
|
28
27
|
fetch(params?: LoadEventFetchParams<_Data, _Input>): Promise<QueryResult<_Data, _Input>>;
|
|
29
28
|
fetch(params?: ClientFetchParams<_Data, _Input>): Promise<QueryResult<_Data, _Input>>;
|
package/build/runtime/types.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { FetchQueryResult } from '$houdini/runtime/lib/types';
|
|
1
|
+
import type { FetchQueryResult, CompiledFragmentKind, QueryResult, GraphQLObject } from '$houdini/runtime/lib/types';
|
|
2
2
|
import type { LoadEvent } from '@sveltejs/kit';
|
|
3
|
+
import type { Readable, Writable } from 'svelte/store';
|
|
4
|
+
import type { QueryStoreFetchParams } from './stores';
|
|
5
|
+
import type { PageInfo } from './stores/pagination/pageInfo';
|
|
3
6
|
export type QueryInputs<_Data> = FetchQueryResult<_Data> & {
|
|
4
7
|
variables: {
|
|
5
8
|
[key: string]: any;
|
|
@@ -30,3 +33,50 @@ export type KitLoadResponse = {
|
|
|
30
33
|
context?: Record<string, any>;
|
|
31
34
|
maxage?: number;
|
|
32
35
|
};
|
|
36
|
+
export type FragmentStoreInstance<_Data> = Readable<_Data> & {
|
|
37
|
+
kind: typeof CompiledFragmentKind;
|
|
38
|
+
update: Writable<_Data>['set'];
|
|
39
|
+
};
|
|
40
|
+
type Reshape<_Data, _Input> = Omit<QueryResult<_Data, _Input>, 'data'> & {
|
|
41
|
+
data: _Data;
|
|
42
|
+
};
|
|
43
|
+
export type CursorFragmentStoreInstance<_Data extends GraphQLObject, _Input> = {
|
|
44
|
+
kind: typeof CompiledFragmentKind;
|
|
45
|
+
data: Readable<_Data>;
|
|
46
|
+
subscribe: Readable<Reshape<_Data, _Input> & {
|
|
47
|
+
pageInfo: PageInfo;
|
|
48
|
+
}>['subscribe'];
|
|
49
|
+
fetching: Readable<boolean>;
|
|
50
|
+
} & CursorHandlers<_Data, _Input>;
|
|
51
|
+
export type OffsetFragmentStoreInstance<_Data extends GraphQLObject, _Input> = {
|
|
52
|
+
kind: typeof CompiledFragmentKind;
|
|
53
|
+
data: Readable<_Data>;
|
|
54
|
+
subscribe: Readable<Reshape<_Data, _Input>>['subscribe'];
|
|
55
|
+
fetching: Readable<boolean>;
|
|
56
|
+
} & OffsetHandlers<_Data, _Input>;
|
|
57
|
+
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
58
|
+
loadNextPage: (args?: {
|
|
59
|
+
first?: number;
|
|
60
|
+
after?: string;
|
|
61
|
+
fetch?: typeof globalThis.fetch;
|
|
62
|
+
metadata: {};
|
|
63
|
+
}) => Promise<void>;
|
|
64
|
+
loadPreviousPage: (args?: {
|
|
65
|
+
last?: number;
|
|
66
|
+
before?: string;
|
|
67
|
+
fetch?: typeof globalThis.fetch;
|
|
68
|
+
metadata?: {};
|
|
69
|
+
}) => Promise<void>;
|
|
70
|
+
pageInfo: Writable<PageInfo>;
|
|
71
|
+
fetch(args?: QueryStoreFetchParams<_Data, _Input> | undefined): Promise<QueryResult<_Data, _Input>>;
|
|
72
|
+
};
|
|
73
|
+
export type OffsetHandlers<_Data extends GraphQLObject, _Input> = {
|
|
74
|
+
loadNextPage: (args?: {
|
|
75
|
+
limit?: number;
|
|
76
|
+
offset?: number;
|
|
77
|
+
metadata?: {};
|
|
78
|
+
fetch?: typeof globalThis.fetch;
|
|
79
|
+
}) => Promise<void>;
|
|
80
|
+
fetch(args?: QueryStoreFetchParams<_Data, _Input> | undefined): Promise<QueryResult<_Data, _Input>>;
|
|
81
|
+
};
|
|
82
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GraphQLObject, FragmentArtifact, HoudiniFetchContext } from '$houdini/runtime/lib/types';
|
|
2
|
+
import type { FragmentStoreInstance } from '../types';
|
|
2
3
|
export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
3
4
|
artifact: FragmentArtifact;
|
|
4
5
|
name: string;
|
|
@@ -8,9 +9,5 @@ export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
|
8
9
|
artifact: FragmentArtifact;
|
|
9
10
|
storeName: string;
|
|
10
11
|
});
|
|
11
|
-
get(initialValue: _Data | null):
|
|
12
|
-
kind: "HoudiniFragment";
|
|
13
|
-
subscribe: (run: import("svelte/store").Subscriber<_Data | null>, invalidate?: ((value?: _Data | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
14
|
-
update: (val: _Data | null) => void;
|
|
15
|
-
};
|
|
12
|
+
get(initialValue: _Data | null): FragmentStoreInstance<_Data | null>;
|
|
16
13
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { DocumentStore } from '$houdini/runtime/client';
|
|
2
2
|
import type { SendParams } from '$houdini/runtime/client/documentStore';
|
|
3
|
-
import type { GraphQLObject, QueryArtifact
|
|
4
|
-
import type {
|
|
5
|
-
import type { QueryStoreFetchParams } from '../query';
|
|
3
|
+
import type { GraphQLObject, QueryArtifact } from '$houdini/runtime/lib/types';
|
|
4
|
+
import type { CursorHandlers } from '../../types';
|
|
6
5
|
import type { FetchFn } from './fetch';
|
|
7
|
-
import type { PageInfo } from './pageInfo';
|
|
8
6
|
export declare function cursorHandlers<_Data extends GraphQLObject, _Input extends Record<string, any>>({ artifact, storeName, observer, fetchUpdate: parentFetchUpdate, fetch: parentFetch, }: {
|
|
9
7
|
artifact: QueryArtifact;
|
|
10
8
|
storeName: string;
|
|
@@ -12,19 +10,3 @@ export declare function cursorHandlers<_Data extends GraphQLObject, _Input exten
|
|
|
12
10
|
fetch: FetchFn<_Data, _Input>;
|
|
13
11
|
fetchUpdate: (arg: SendParams, updates: string[]) => ReturnType<FetchFn<_Data, _Input>>;
|
|
14
12
|
}): CursorHandlers<_Data, _Input>;
|
|
15
|
-
export type CursorHandlers<_Data extends GraphQLObject, _Input> = {
|
|
16
|
-
loadNextPage: (args?: {
|
|
17
|
-
first?: number;
|
|
18
|
-
after?: string;
|
|
19
|
-
fetch?: typeof globalThis.fetch;
|
|
20
|
-
metadata: {};
|
|
21
|
-
}) => Promise<void>;
|
|
22
|
-
loadPreviousPage: (args?: {
|
|
23
|
-
last?: number;
|
|
24
|
-
before?: string;
|
|
25
|
-
fetch?: typeof globalThis.fetch;
|
|
26
|
-
metadata?: {};
|
|
27
|
-
}) => Promise<void>;
|
|
28
|
-
pageInfo: Writable<PageInfo>;
|
|
29
|
-
fetch(args?: QueryStoreFetchParams<_Data, _Input> | undefined): Promise<QueryResult<_Data, _Input>>;
|
|
30
|
-
};
|