Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('createFragment() simple cases', () => {
"fragment ContentUrl on ContentUrl { type default hierarchical internal graph base }",
"fragment IContentMetadata on IContentMetadata { key locale fallbackForLocale version displayName url {...ContentUrl} types published status created lastModified sortOrder variation ...MediaMetadata }",
"fragment _IContent on _IContent { _deleted _fulltext _modified _score _id _track _metadata {...IContentMetadata} }",
"fragment ct1 on ct1 { __typename lin { url { ...ContentUrl }} ric { html, json } lin2 { url { ...ContentUrl }} ric2 { html, json } ..._IContent }",
"fragment ct1 on ct1 { __typename lin { text title target url { ...ContentUrl }} ric { html, json } lin2 { text title target url { ...ContentUrl }} ric2 { html, json } ..._IContent }",
]
`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-cms-sdk/src/graph/createQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function convertPropertyField(
fields.push(`${name} { ...ContentUrl }`);
} else if (property.type === 'link') {
extraFragments.push(CONTENT_URL_FRAGMENT);
fields.push(`${name} { url { ...ContentUrl }}`);
fields.push(`${name} { text title target url { ...ContentUrl }}`);
} else if (property.type === 'contentReference') {
extraFragments.push(CONTENT_URL_FRAGMENT);
fields.push(`${name} { key url { ...ContentUrl }}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/optimizely-cms-sdk/src/infer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export type InferFromProperty<T extends AnyProperty> =
: T extends JsonProperty ? any
: T extends RichTextProperty ? InferredRichText
: T extends UrlProperty ? InferredUrl
: T extends LinkProperty ? { url: InferredUrl }
: T extends LinkProperty ? { text: string | null, title: string | null, target: string | null, url: InferredUrl }
: T extends IntegerProperty ? number
: T extends FloatProperty ? number
: T extends ContentReferenceProperty ? { url: InferredUrl }
Expand Down
Loading