@remkoj/optimizely-graph-functions 5.0.1 → 5.1.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.
@@ -1,39 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [
4
- `query getContentById($key: String!, $version: String, $locale: [Locales!], $path: String, $domain: String) {
5
- content: _Content(
6
- where: {
7
- _or: [
8
- { _metadata: { key: { eq: $key }, version: { eq: $version } } }
9
- { _metadata: { url: { hierarchical: { eq: $path }, base: { eq: $domain } }, version: { eq: $version } } }
10
- ]
11
- }
12
- locale: $locale
13
- ) {
14
- total
15
- items: item {
16
- ...BlockData
17
- ...PageData
4
+ `query getContentById($key: String!, $version: String, $locale: [Locales!], $path: String = "-", $domain: String, $changeset: String) {
5
+ content: _Content(
6
+ variation: { include: ALL }
7
+ where: {
8
+ _or: [
9
+ { _metadata: { key: { eq: $key }, version: { eq: $version } } }
10
+ {
11
+ _metadata: {
12
+ url: { default: { eq: $path }, base: { eq: $domain } }
13
+ version: { eq: $version }
14
+ }
18
15
  }
16
+ ]
17
+ _metadata: { changeset: { eq: $changeset } }
19
18
  }
19
+ locale: $locale
20
+ ) {
21
+ total
22
+ items: item {
23
+ ...IContentData
24
+ ...BlockData
25
+ ...PageData
26
+ }
27
+ }
20
28
  }`,
21
- `query getContentByPath($path: [String!]!, $locale: [Locales!], $siteId: String) {
22
- content: _Content(
23
- where: {
24
- _metadata: { url: { default: { in: $path }, base: { eq: $siteId } }}
25
- }
26
- locale: $locale
27
- ) {
28
- total
29
- items: item {
30
- ...IContentData
31
- ...PageData
32
- }
29
+ `query getContentByPath($path: [String!]!, $locale: [Locales!], $siteId: String, $changeset: String = null) {
30
+ content: _Content(
31
+ where: {
32
+ _metadata: {
33
+ url: { default: { in: $path }, base: { eq: $siteId } }
34
+ changeset: { eq: $changeset }
35
+ }
36
+ }
37
+ locale: $locale
38
+ ) {
39
+ total
40
+ items: item {
41
+ ...IContentData
42
+ ...PageData
33
43
  }
44
+ }
34
45
  }`,
35
- `query getContentType($key: String!, $version: String, $locale: [Locales!], $path: String, $domain: String) {
46
+ `query getContentType($key: String!, $version: String, $locale: [Locales!], $path: String = "-", $domain: String) {
36
47
  content: _Content(
48
+ variation: { include: ALL }
37
49
  where: {
38
50
  _or: [
39
51
  { _metadata: { key: { eq: $key }, version: { eq: $version } } }
@@ -1 +1 @@
1
- {"version":3,"file":"queries.cms13.js","sourceRoot":"","sources":["../../src/documents/queries.cms13.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb;;;;;;;;;;;;;;;;MAgBI;IACJ;;;;;;;;;;;;;MAaI;IACJ;;;;;;;;;;;;;;;;;MAiBI;CACL,CAAA"}
1
+ {"version":3,"file":"queries.cms13.js","sourceRoot":"","sources":["../../src/documents/queries.cms13.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;MAwBI;IACJ;;;;;;;;;;;;;;;;MAgBI;IACJ;;;;;;;;;;;;;;;;;;MAkBI;CACL,CAAA"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "repository": "https://github.com/remkoj/optimizely-dxp-clients.git",
4
4
  "author": "Remko Jantzen <693172+remkoj@users.noreply.github.com>",
5
5
  "homepage": "https://github.com/remkoj/optimizely-dxp-clients",
6
- "version": "5.0.1",
6
+ "version": "5.1.0",
7
7
  "license": "Apache-2.0",
8
8
  "type": "commonjs",
9
9
  "description": "GraphQL Codegen preset for Optimizely Graph",
@@ -42,19 +42,19 @@
42
42
  }
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^22.14.1",
46
- "graphql": "^16.10.0",
45
+ "@types/node": "^22.16.0",
46
+ "graphql": "^16.11.0",
47
47
  "graphql-request": "^6.1.0",
48
48
  "graphql-tag": "^2.12.6",
49
49
  "typescript": "^5.8.3"
50
50
  },
51
51
  "dependencies": {
52
52
  "@graphql-codegen/add": "^5.0.3",
53
- "@graphql-codegen/client-preset": "^4.8.0",
54
- "@graphql-codegen/plugin-helpers": "^5.1.0",
53
+ "@graphql-codegen/client-preset": "^4.8.3",
54
+ "@graphql-codegen/plugin-helpers": "^5.1.1",
55
55
  "@graphql-codegen/typescript": "^4.1.6",
56
- "@graphql-codegen/typescript-graphql-request": "^6.2.0",
57
- "@graphql-codegen/typescript-operations": "^4.6.0",
56
+ "@graphql-codegen/typescript-graphql-request": "^6.3.0",
57
+ "@graphql-codegen/typescript-operations": "^4.6.1",
58
58
  "graphql-sock": "^1.0.1",
59
59
  "tslib": "^2.8.1"
60
60
  },
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@graphql-typed-document-node/core": "^3",
70
- "@remkoj/optimizely-graph-client": "^5.0.1",
70
+ "@remkoj/optimizely-graph-client": "^5.1.0",
71
71
  "graphql": "^16",
72
72
  "graphql-request": "^6",
73
73
  "graphql-tag": "^2"