@remkoj/optimizely-graph-functions 4.3.1 → 4.4.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,38 +1,48 @@
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 {
16
- ...BlockData
17
- ...PageData
4
+ `query getContentById($key: String!, $version: String, $locale: [Locales!], $path: String = "-", $domain: String, $changeset: String) {
5
+ content: _Content(
6
+ where: {
7
+ _or: [
8
+ { _metadata: { key: { eq: $key }, version: { eq: $version } } }
9
+ {
10
+ _metadata: {
11
+ url: { default: { eq: $path }, base: { eq: $domain } }
12
+ version: { eq: $version }
13
+ }
18
14
  }
15
+ ]
16
+ _metadata: { changeset: { eq: $changeset } }
19
17
  }
18
+ locale: $locale
19
+ ) {
20
+ total
21
+ items {
22
+ ...IContentData
23
+ ...BlockData
24
+ ...PageData
25
+ }
26
+ }
20
27
  }`,
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 {
30
- ...IContentData
31
- ...PageData
32
- }
28
+ `query getContentByPath($path: [String!]!, $locale: [Locales!], $siteId: String, $changeset: String = null) {
29
+ content: _Content(
30
+ where: {
31
+ _metadata: {
32
+ url: { default: { in: $path }, base: { eq: $siteId } }
33
+ changeset: { eq: $changeset }
34
+ }
35
+ }
36
+ locale: $locale
37
+ ) {
38
+ total
39
+ items {
40
+ ...IContentData
41
+ ...PageData
33
42
  }
43
+ }
34
44
  }`,
35
- `query getContentType($key: String!, $version: String, $locale: [Locales!], $path: String, $domain: String) {
45
+ `query getContentType($key: String!, $version: String, $locale: [Locales!], $path: String = "-", $domain: String) {
36
46
  content: _Content(
37
47
  where: {
38
48
  _or: [
@@ -1 +1 @@
1
- {"version":3,"file":"queries.cms13.js","sourceRoot":"","sources":["../../src/documents/queries.cms13.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX;;;;;;;;;;;;;;;;MAgBE;IACF;;;;;;;;;;;;;MAaE;IACF;;;;;;;;;;;;;;;;;MAiBE;CACL,CAAA"}
1
+ {"version":3,"file":"queries.cms13.js","sourceRoot":"","sources":["../../src/documents/queries.cms13.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;MAuBI;IACJ;;;;;;;;;;;;;;;;MAgBI;IACJ;;;;;;;;;;;;;;;;;MAiBI;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": "4.3.1",
6
+ "version": "4.4.0",
7
7
  "license": "Apache-2.0",
8
8
  "type": "commonjs",
9
9
  "description": "GraphQL Codegen preset for Optimizely Graph",