@hackersheet/core 0.1.0-alpha.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.
- package/README.md +3 -0
- package/dist/chunk-3GXIDS5H.mjs +23 -0
- package/dist/chunk-5X53IRLN.mjs +2417 -0
- package/dist/chunk-7R3CATQT.mjs +143 -0
- package/dist/chunk-C3G2CMRR.mjs +13 -0
- package/dist/chunk-EXRG4APR.mjs +34 -0
- package/dist/chunk-FIFBNWMD.mjs +21 -0
- package/dist/chunk-FRXB4F4I.mjs +0 -0
- package/dist/chunk-JGQBUURE.mjs +60 -0
- package/dist/chunk-PA32N4A6.mjs +6 -0
- package/dist/chunk-PUTNZ4GU.mjs +12 -0
- package/dist/chunk-RRJUH3D4.mjs +0 -0
- package/dist/chunk-SYHSU6VH.mjs +38 -0
- package/dist/chunk-TXCPBPKN.mjs +12 -0
- package/dist/chunk-VKWT2GNZ.mjs +0 -0
- package/dist/chunk-WIUPPYM5.mjs +60 -0
- package/dist/chunk-YAN7TO2B.mjs +0 -0
- package/dist/chunk-ZZFAG7Y6.mjs +705 -0
- package/dist/client/client.d.mts +51 -0
- package/dist/client/client.d.ts +51 -0
- package/dist/client/client.js +3424 -0
- package/dist/client/client.mjs +20 -0
- package/dist/client/create-client.d.mts +11 -0
- package/dist/client/create-client.d.ts +11 -0
- package/dist/client/create-client.js +3429 -0
- package/dist/client/create-client.mjs +21 -0
- package/dist/client/operations/get-document.d.mts +15 -0
- package/dist/client/operations/get-document.d.ts +15 -0
- package/dist/client/operations/get-document.js +881 -0
- package/dist/client/operations/get-document.mjs +14 -0
- package/dist/client/operations/get-documents.d.mts +14 -0
- package/dist/client/operations/get-documents.d.ts +14 -0
- package/dist/client/operations/get-documents.js +798 -0
- package/dist/client/operations/get-documents.mjs +14 -0
- package/dist/client/operations/get-tag.d.mts +12 -0
- package/dist/client/operations/get-tag.d.ts +12 -0
- package/dist/client/operations/get-tag.js +776 -0
- package/dist/client/operations/get-tag.mjs +14 -0
- package/dist/client/operations/get-tags.d.mts +14 -0
- package/dist/client/operations/get-tags.d.ts +14 -0
- package/dist/client/operations/get-tags.js +772 -0
- package/dist/client/operations/get-tags.mjs +14 -0
- package/dist/client/operations/get-websites.d.mts +14 -0
- package/dist/client/operations/get-websites.d.ts +14 -0
- package/dist/client/operations/get-websites.js +798 -0
- package/dist/client/operations/get-websites.mjs +14 -0
- package/dist/client/operations/index.d.mts +11 -0
- package/dist/client/operations/index.d.ts +11 -0
- package/dist/client/operations/index.js +1041 -0
- package/dist/client/operations/index.mjs +31 -0
- package/dist/gql/fragment-masking.d.mts +22 -0
- package/dist/gql/fragment-masking.d.ts +22 -0
- package/dist/gql/fragment-masking.js +47 -0
- package/dist/gql/fragment-masking.mjs +10 -0
- package/dist/gql/gql.d.mts +70 -0
- package/dist/gql/gql.d.ts +70 -0
- package/dist/gql/gql.js +739 -0
- package/dist/gql/gql.mjs +7 -0
- package/dist/gql/graphql.d.mts +722 -0
- package/dist/gql/graphql.d.ts +722 -0
- package/dist/gql/graphql.js +733 -0
- package/dist/gql/graphql.mjs +14 -0
- package/dist/gql/index.d.mts +4 -0
- package/dist/gql/index.d.ts +4 -0
- package/dist/gql/index.js +761 -0
- package/dist/gql/index.mjs +16 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3429 -0
- package/dist/index.mjs +22 -0
- package/dist/types/document.d.mts +71 -0
- package/dist/types/document.d.ts +71 -0
- package/dist/types/document.js +18 -0
- package/dist/types/document.mjs +0 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/tag.d.mts +23 -0
- package/dist/types/tag.d.ts +23 -0
- package/dist/types/tag.js +18 -0
- package/dist/types/tag.mjs +0 -0
- package/dist/types/website.d.mts +29 -0
- package/dist/types/website.d.ts +29 -0
- package/dist/types/website.js +18 -0
- package/dist/types/website.mjs +0 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +49 -0
- package/dist/utils/index.mjs +12 -0
- package/dist/utils/make-after-cursor-from-page.d.mts +3 -0
- package/dist/utils/make-after-cursor-from-page.d.ts +3 -0
- package/dist/utils/make-after-cursor-from-page.js +32 -0
- package/dist/utils/make-after-cursor-from-page.mjs +6 -0
- package/dist/utils/non-nullable-filter.d.mts +3 -0
- package/dist/utils/non-nullable-filter.d.ts +3 -0
- package/dist/utils/non-nullable-filter.js +30 -0
- package/dist/utils/non-nullable-filter.mjs +6 -0
- package/dist/utils/to-array-from-edges.d.mts +6 -0
- package/dist/utils/to-array-from-edges.d.ts +6 -0
- package/dist/utils/to-array-from-edges.js +34 -0
- package/dist/utils/to-array-from-edges.mjs +7 -0
- package/license.md +21 -0
- package/package.json +36 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "../../chunk-FRXB4F4I.mjs";
|
|
2
|
+
import {
|
|
3
|
+
makeGetDocumentsResponse
|
|
4
|
+
} from "../../chunk-JGQBUURE.mjs";
|
|
5
|
+
import {
|
|
6
|
+
makeGetTagResponse
|
|
7
|
+
} from "../../chunk-SYHSU6VH.mjs";
|
|
8
|
+
import {
|
|
9
|
+
makeGetTagsResponse
|
|
10
|
+
} from "../../chunk-EXRG4APR.mjs";
|
|
11
|
+
import {
|
|
12
|
+
makeGetWebsitesResponse
|
|
13
|
+
} from "../../chunk-WIUPPYM5.mjs";
|
|
14
|
+
import {
|
|
15
|
+
makeGetDocumentResponse
|
|
16
|
+
} from "../../chunk-7R3CATQT.mjs";
|
|
17
|
+
import "../../chunk-VKWT2GNZ.mjs";
|
|
18
|
+
import "../../chunk-PUTNZ4GU.mjs";
|
|
19
|
+
import "../../chunk-C3G2CMRR.mjs";
|
|
20
|
+
import "../../chunk-PA32N4A6.mjs";
|
|
21
|
+
import "../../chunk-RRJUH3D4.mjs";
|
|
22
|
+
import "../../chunk-FIFBNWMD.mjs";
|
|
23
|
+
import "../../chunk-3GXIDS5H.mjs";
|
|
24
|
+
import "../../chunk-ZZFAG7Y6.mjs";
|
|
25
|
+
export {
|
|
26
|
+
makeGetDocumentResponse,
|
|
27
|
+
makeGetDocumentsResponse,
|
|
28
|
+
makeGetTagResponse,
|
|
29
|
+
makeGetTagsResponse,
|
|
30
|
+
makeGetWebsitesResponse
|
|
31
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DocumentTypeDecoration, ResultOf, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { Incremental } from './graphql.mjs';
|
|
3
|
+
|
|
4
|
+
type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
5
|
+
' $fragmentName'?: infer TKey;
|
|
6
|
+
}] ? TKey extends string ? {
|
|
7
|
+
' $fragmentRefs'?: {
|
|
8
|
+
[key in TKey]: TType;
|
|
9
|
+
};
|
|
10
|
+
} : never : never : never;
|
|
11
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
|
|
12
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
|
|
13
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
|
|
14
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
|
|
15
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
|
|
16
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
|
|
17
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
18
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
19
|
+
declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
20
|
+
declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
|
|
21
|
+
|
|
22
|
+
export { type FragmentType, getFragmentData, isFragmentReady, makeFragmentData };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DocumentTypeDecoration, ResultOf, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { Incremental } from './graphql.js';
|
|
3
|
+
|
|
4
|
+
type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
5
|
+
' $fragmentName'?: infer TKey;
|
|
6
|
+
}] ? TKey extends string ? {
|
|
7
|
+
' $fragmentRefs'?: {
|
|
8
|
+
[key in TKey]: TType;
|
|
9
|
+
};
|
|
10
|
+
} : never : never : never;
|
|
11
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
|
|
12
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
|
|
13
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
|
|
14
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
|
|
15
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
|
|
16
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
|
|
17
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
18
|
+
declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
19
|
+
declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
20
|
+
declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
|
|
21
|
+
|
|
22
|
+
export { type FragmentType, getFragmentData, isFragmentReady, makeFragmentData };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/gql/fragment-masking.ts
|
|
21
|
+
var fragment_masking_exports = {};
|
|
22
|
+
__export(fragment_masking_exports, {
|
|
23
|
+
getFragmentData: () => getFragmentData,
|
|
24
|
+
isFragmentReady: () => isFragmentReady,
|
|
25
|
+
makeFragmentData: () => makeFragmentData
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(fragment_masking_exports);
|
|
28
|
+
function getFragmentData(_documentNode, fragmentType) {
|
|
29
|
+
return fragmentType;
|
|
30
|
+
}
|
|
31
|
+
function makeFragmentData(data, _fragment) {
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
function isFragmentReady(queryNode, fragmentNode, data) {
|
|
35
|
+
const deferredFields = queryNode.__meta__?.deferredFields;
|
|
36
|
+
if (!deferredFields) return true;
|
|
37
|
+
const fragDef = fragmentNode.definitions[0];
|
|
38
|
+
const fragName = fragDef?.name?.value;
|
|
39
|
+
const fields = fragName && deferredFields[fragName] || [];
|
|
40
|
+
return fields.length > 0 && fields.every((field) => data && field in data);
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
getFragmentData,
|
|
45
|
+
isFragmentReady,
|
|
46
|
+
makeFragmentData
|
|
47
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DocumentQuery, Exact, InputMaybe, Scalars, DocumentsQuery, DocumentConnectionFilter, ConnectionSort, TagQuery, TagsQuery, WebsitesQuery } from './graphql.mjs';
|
|
2
|
+
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Map of all GraphQL operations in the project.
|
|
6
|
+
*
|
|
7
|
+
* This map has several performance disadvantages:
|
|
8
|
+
* 1. It is not tree-shakeable, so it will include all operations in the project.
|
|
9
|
+
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
|
|
10
|
+
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
11
|
+
*
|
|
12
|
+
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
13
|
+
*/
|
|
14
|
+
declare const documents: {
|
|
15
|
+
'\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n': TypedDocumentNode<DocumentQuery, Exact<{
|
|
16
|
+
slug?: InputMaybe<Scalars["String"]["input"]>;
|
|
17
|
+
}>>;
|
|
18
|
+
'\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n': TypedDocumentNode<DocumentsQuery, Exact<{
|
|
19
|
+
after?: InputMaybe<Scalars["String"]["input"]>;
|
|
20
|
+
first?: InputMaybe<Scalars["Int"]["input"]>;
|
|
21
|
+
filter?: InputMaybe<DocumentConnectionFilter>;
|
|
22
|
+
sort?: InputMaybe<ConnectionSort>;
|
|
23
|
+
}>>;
|
|
24
|
+
'\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n': TypedDocumentNode<TagQuery, Exact<{
|
|
25
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
26
|
+
}>>;
|
|
27
|
+
'\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n': TypedDocumentNode<TagsQuery, Exact<{
|
|
28
|
+
sort?: InputMaybe<ConnectionSort>;
|
|
29
|
+
}>>;
|
|
30
|
+
'\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n': TypedDocumentNode<WebsitesQuery, Exact<{
|
|
31
|
+
after?: InputMaybe<Scalars["String"]["input"]>;
|
|
32
|
+
first?: InputMaybe<Scalars["Int"]["input"]>;
|
|
33
|
+
}>>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* The query argument is unknown!
|
|
45
|
+
* Please regenerate the types.
|
|
46
|
+
*/
|
|
47
|
+
declare function graphql(source: string): unknown;
|
|
48
|
+
/**
|
|
49
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
50
|
+
*/
|
|
51
|
+
declare function graphql(source: '\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n'];
|
|
52
|
+
/**
|
|
53
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
54
|
+
*/
|
|
55
|
+
declare function graphql(source: '\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n'): (typeof documents)['\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n'];
|
|
56
|
+
/**
|
|
57
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
58
|
+
*/
|
|
59
|
+
declare function graphql(source: '\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n'];
|
|
60
|
+
/**
|
|
61
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
62
|
+
*/
|
|
63
|
+
declare function graphql(source: '\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n'): (typeof documents)['\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n'];
|
|
64
|
+
/**
|
|
65
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
66
|
+
*/
|
|
67
|
+
declare function graphql(source: '\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n'];
|
|
68
|
+
type DocumentType<TDocumentNode extends TypedDocumentNode<any, any>> = TDocumentNode extends TypedDocumentNode<infer TType, any> ? TType : never;
|
|
69
|
+
|
|
70
|
+
export { type DocumentType, graphql };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DocumentQuery, Exact, InputMaybe, Scalars, DocumentsQuery, DocumentConnectionFilter, ConnectionSort, TagQuery, TagsQuery, WebsitesQuery } from './graphql.js';
|
|
2
|
+
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Map of all GraphQL operations in the project.
|
|
6
|
+
*
|
|
7
|
+
* This map has several performance disadvantages:
|
|
8
|
+
* 1. It is not tree-shakeable, so it will include all operations in the project.
|
|
9
|
+
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
|
|
10
|
+
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
11
|
+
*
|
|
12
|
+
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
13
|
+
*/
|
|
14
|
+
declare const documents: {
|
|
15
|
+
'\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n': TypedDocumentNode<DocumentQuery, Exact<{
|
|
16
|
+
slug?: InputMaybe<Scalars["String"]["input"]>;
|
|
17
|
+
}>>;
|
|
18
|
+
'\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n': TypedDocumentNode<DocumentsQuery, Exact<{
|
|
19
|
+
after?: InputMaybe<Scalars["String"]["input"]>;
|
|
20
|
+
first?: InputMaybe<Scalars["Int"]["input"]>;
|
|
21
|
+
filter?: InputMaybe<DocumentConnectionFilter>;
|
|
22
|
+
sort?: InputMaybe<ConnectionSort>;
|
|
23
|
+
}>>;
|
|
24
|
+
'\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n': TypedDocumentNode<TagQuery, Exact<{
|
|
25
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
26
|
+
}>>;
|
|
27
|
+
'\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n': TypedDocumentNode<TagsQuery, Exact<{
|
|
28
|
+
sort?: InputMaybe<ConnectionSort>;
|
|
29
|
+
}>>;
|
|
30
|
+
'\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n': TypedDocumentNode<WebsitesQuery, Exact<{
|
|
31
|
+
after?: InputMaybe<Scalars["String"]["input"]>;
|
|
32
|
+
first?: InputMaybe<Scalars["Int"]["input"]>;
|
|
33
|
+
}>>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* The query argument is unknown!
|
|
45
|
+
* Please regenerate the types.
|
|
46
|
+
*/
|
|
47
|
+
declare function graphql(source: string): unknown;
|
|
48
|
+
/**
|
|
49
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
50
|
+
*/
|
|
51
|
+
declare function graphql(source: '\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n'];
|
|
52
|
+
/**
|
|
53
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
54
|
+
*/
|
|
55
|
+
declare function graphql(source: '\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n'): (typeof documents)['\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n'];
|
|
56
|
+
/**
|
|
57
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
58
|
+
*/
|
|
59
|
+
declare function graphql(source: '\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n'];
|
|
60
|
+
/**
|
|
61
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
62
|
+
*/
|
|
63
|
+
declare function graphql(source: '\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n'): (typeof documents)['\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n'];
|
|
64
|
+
/**
|
|
65
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
66
|
+
*/
|
|
67
|
+
declare function graphql(source: '\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n'): (typeof documents)['\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n'];
|
|
68
|
+
type DocumentType<TDocumentNode extends TypedDocumentNode<any, any>> = TDocumentNode extends TypedDocumentNode<infer TType, any> ? TType : never;
|
|
69
|
+
|
|
70
|
+
export { type DocumentType, graphql };
|