@laioutr/app-hygraph 1.1.8 → 1.3.0

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 (31) hide show
  1. package/dist/codegen/index.d.mts +18 -0
  2. package/dist/codegen/index.mjs +41 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +1 -1
  5. package/dist/queries/index.d.mts +1 -0
  6. package/dist/queries/index.mjs +1 -0
  7. package/dist/runtime/index.d.ts +4 -0
  8. package/dist/runtime/index.js +3 -0
  9. package/dist/runtime/server/client/hygraph.d.ts +4 -2
  10. package/dist/runtime/server/client/hygraph.js +2 -2
  11. package/dist/runtime/server/const/passthroughTokens.d.ts +1 -0
  12. package/dist/runtime/server/const/passthroughTokens.js +1 -0
  13. package/dist/runtime/server/generated/graphql.d.ts +8062 -0
  14. package/dist/runtime/server/generated/graphql.js +367 -0
  15. package/dist/runtime/server/hygraph-utils/mediaMapper.d.ts +6 -1
  16. package/dist/runtime/server/hygraph-utils/mediaMapper.js +5 -5
  17. package/dist/runtime/server/media-library/hygraph.js +2 -2
  18. package/dist/runtime/server/middleware/defineHygraph.js +3 -1
  19. package/dist/runtime/server/orchestr/blog/blogCollection.resolver.js +15 -11
  20. package/dist/runtime/server/orchestr/blog/blogCollectionBySlug.query.js +15 -3
  21. package/dist/runtime/server/orchestr/blog/blogCollectionBySlug.template.js +8 -6
  22. package/dist/runtime/server/orchestr/blog/blogCollectionPosts.link.js +14 -9
  23. package/dist/runtime/server/orchestr/blog/blogPost.resolver.js +7 -3
  24. package/dist/runtime/server/orchestr/blog/blogPostBySlug.query.js +2 -2
  25. package/dist/runtime/server/queries/blog.d.ts +4 -2
  26. package/dist/runtime/server/queries/blog.js +29 -4
  27. package/dist/runtime/server/queries/mediaLibrary.d.ts +1 -1
  28. package/dist/runtime/server/queries/mediaLibrary.js +1 -1
  29. package/dist/runtime/server/types/hygraph.d.ts +18 -0
  30. package/dist/runtime/server/types/hygraph.js +0 -0
  31. package/package.json +37 -2
@@ -1 +1 @@
1
- export declare const MediaLibraryListQuery = "\n #graphql\n \n #graphql\n fragment Asset on Asset {\n url\n fileName\n mimeType\n width\n height\n handle\n }\n\n query MediaLibraryList($skip: Int, $first: Int, $search: String) {\n assets(skip: $skip, first: $first, orderBy: createdAt_DESC, where: { _search: $search }) {\n ...Asset\n }\n }\n";
1
+ export declare const MEDIA_LIBRARY_LIST_QUERY = "\n #graphql\n \n #graphql\n fragment Asset on Asset {\n url\n fileName\n mimeType\n width\n height\n handle\n }\n\n query MediaLibraryList($skip: Int, $first: Int, $search: String) {\n assets(skip: $skip, first: $first, orderBy: createdAt_DESC, where: { _search: $search }) {\n ...Asset\n }\n }\n";
@@ -1,5 +1,5 @@
1
1
  import { AssetFragment } from "./asset.js";
2
- export const MediaLibraryListQuery = (
2
+ export const MEDIA_LIBRARY_LIST_QUERY = (
3
3
  /* GraphQL */
4
4
  `
5
5
  #graphql
@@ -0,0 +1,18 @@
1
+ export interface HygraphAsset {
2
+ url: string;
3
+ fileName: string;
4
+ mimeType?: string | null;
5
+ width?: number | null;
6
+ height?: number | null;
7
+ handle: string;
8
+ }
9
+ export interface HygraphClientConfig {
10
+ contentApiUrl: string;
11
+ token: string;
12
+ }
13
+ export interface HygraphResponse<TData> {
14
+ data: TData;
15
+ errors?: Array<{
16
+ message: string;
17
+ }>;
18
+ }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laioutr/app-hygraph",
3
- "version": "1.1.8",
3
+ "version": "1.3.0",
4
4
  "description": "Laioutr Hygraph App",
5
5
  "repository": "your-org/@laioutr/app-hygraph",
6
6
  "license": "MIT",
@@ -9,6 +9,18 @@
9
9
  ".": {
10
10
  "types": "./dist/types.d.mts",
11
11
  "import": "./dist/module.mjs"
12
+ },
13
+ "./runtime": {
14
+ "types": "./dist/runtime/index.d.ts",
15
+ "import": "./dist/runtime/index.js"
16
+ },
17
+ "./codegen": {
18
+ "types": "./dist/codegen/index.d.mts",
19
+ "import": "./dist/codegen/index.mjs"
20
+ },
21
+ "./queries": {
22
+ "types": "./dist/queries/index.d.mts",
23
+ "import": "./dist/queries/index.mjs"
12
24
  }
13
25
  },
14
26
  "main": "./dist/module.mjs",
@@ -16,6 +28,15 @@
16
28
  "*": {
17
29
  ".": [
18
30
  "./dist/types.d.mts"
31
+ ],
32
+ "runtime": [
33
+ "./dist/runtime/index.d.ts"
34
+ ],
35
+ "codegen": [
36
+ "./dist/codegen/index.d.mts"
37
+ ],
38
+ "queries": [
39
+ "./dist/queries/index.d.mts"
19
40
  ]
20
41
  }
21
42
  },
@@ -59,13 +80,27 @@
59
80
  "typescript": "5.9.2",
60
81
  "vitest": "3.1.1",
61
82
  "vue-tsc": "2.2.10",
83
+ "@graphql-codegen/cli": "^6.2.1",
84
+ "@graphql-codegen/typescript": "^5.0.9",
85
+ "@graphql-codegen/typescript-operations": "^5.0.9",
86
+ "graphql": "^16.13.1",
62
87
  "@laioutr-app/ui": "^1.32.2"
63
88
  },
64
89
  "peerDependencies": {
65
90
  "@laioutr-core/canonical-types": ">=0.22.13",
66
91
  "@laioutr-core/core-types": ">=0.28.8",
67
92
  "@laioutr-core/frontend-core": ">=0.28.8",
68
- "@laioutr-core/kit": ">=0.28.8"
93
+ "@laioutr-core/kit": ">=0.28.8",
94
+ "@graphql-codegen/cli": "^6.0.0",
95
+ "graphql": "^16.0.0"
96
+ },
97
+ "peerDependenciesMeta": {
98
+ "@graphql-codegen/cli": {
99
+ "optional": true
100
+ },
101
+ "graphql": {
102
+ "optional": true
103
+ }
69
104
  },
70
105
  "engines": {
71
106
  "node": ">=22.12.0",