Skip to content

Commit 9b279fe

Browse files
authored
Merge pull request #173 from episerver/bugfix/CMS-46969-layouttype
Add ICompositionNode.layoutType
2 parents 45cdc58 + 886a356 commit 9b279fe

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/optimizely-cms-sdk/src/graph/__test__/createQueryExperiences.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('createFragment()', () => {
2222
"fragment IContentMetadata on IContentMetadata { key locale fallbackForLocale version displayName url {...ContentUrl} types published status created lastModified sortOrder variation ...MediaMetadata ...ItemMetadata ...InstanceMetadata }",
2323
"fragment _IContent on _IContent { _id _metadata {...IContentMetadata} }",
2424
"fragment _IExperience on _IExperience { composition {...ICompositionNode }}",
25-
"fragment ICompositionNode on ICompositionNode { __typename key type nodeType displayName displayTemplateKey displaySettings {key value} ...on CompositionStructureNode { nodes @recursive } ...on CompositionComponentNode { nodeType component { ..._IComponent } } }",
25+
"fragment ICompositionNode on ICompositionNode { __typename key type nodeType layoutType displayName displayTemplateKey displaySettings {key value} ...on CompositionStructureNode { nodes @recursive } ...on CompositionComponentNode { nodeType component { ..._IComponent } } }",
2626
"fragment CallToAction on CallToAction { __typename CallToAction__label:label CallToAction__link:link ..._IContent }",
2727
"fragment ExpSection on ExpSection { __typename ExpSection__heading:heading ..._IContent }",
2828
"fragment _IComponent on _IComponent { __typename ...CallToAction ...ExpSection }",

packages/optimizely-cms-sdk/src/graph/createQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function createExperienceFragments(visited: Set<string>): string[] {
176176
// Fixed fragments for all experiences
177177
const fixedFragments = [
178178
'fragment _IExperience on _IExperience { composition {...ICompositionNode }}',
179-
'fragment ICompositionNode on ICompositionNode { __typename key type nodeType displayName displayTemplateKey displaySettings {key value} ...on CompositionStructureNode { nodes @recursive } ...on CompositionComponentNode { nodeType component { ..._IComponent } } }',
179+
'fragment ICompositionNode on ICompositionNode { __typename key type nodeType layoutType displayName displayTemplateKey displaySettings {key value} ...on CompositionStructureNode { nodes @recursive } ...on CompositionComponentNode { nodeType component { ..._IComponent } } }',
180180
];
181181

182182
const experienceNodes = getCachedContentTypes()

packages/optimizely-cms-sdk/src/infer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export type ExperienceCompositionNode = {
142142
type: string | null;
143143

144144
key: string;
145+
layoutType: string | null;
145146
displayName: string;
146147
displayTemplateKey: string | null;
147148
displaySettings: DisplaySettingsType[] | null;

0 commit comments

Comments
 (0)