You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the code from the 'redesign' branch, so I appreciate that this is still being worked on.
I have extended the type 'ImageMedia' to include a new 'AltText' property to support SEO and Accessibility.
The following query works
query MyQuery {
ImageMedia {
items {
Title
_metadata {
displayName
url {
type
hierarchical
default
base
}
}
}
}
}
...but when I place the image directly into a content area the new 'Title' property isn't returned. The fragments in the 'getContentByPath' query don't support the extra property when the items are expanded.
If I take the generated 'getContentByPath', amend it as shown below then it works.
fragment BlockData on IContent {
...IContentData
...HeroWithImageBlockData
...TextBlockData
...ImageMediaData // added this new fragment
}
fragment ImageMediaData on ImageMedia {
Title
_metadata {
displayName
url {
...LinkData
}
}
}
I think we should be able to extend the built in Image and Video models to support these common properties.
Thanks
The text was updated successfully, but these errors were encountered:
The frontend uses file patterns to decide which fragments must be included in the BlockData, PageData and - in the future, when #22 has been completed - ElementData fragments. The configuration for these patterns can be set in the "injections" section within apps/frontend/codegen.ts.
Can you confirm that the file that includes the ImageMediaData fragment you've created is matched by one of the patterns that would place it in BlockData?
Hi @remkoj
I am using the code from the 'redesign' branch, so I appreciate that this is still being worked on.
I have extended the type 'ImageMedia' to include a new 'AltText' property to support SEO and Accessibility.
The following query works
...but when I place the image directly into a content area the new 'Title' property isn't returned. The fragments in the 'getContentByPath' query don't support the extra property when the items are expanded.
If I take the generated 'getContentByPath', amend it as shown below then it works.
I think we should be able to extend the built in Image and Video models to support these common properties.
Thanks
The text was updated successfully, but these errors were encountered: