graphql_focal_point
15 sites
No security coverage
A GraphQL extension module that exposes focal point coordinates for image fields.
Features
- Adds
focalPointfield toFieldItemTypeImagein GraphQL. - Provides coordinates in multiple formats:
- Percentage values (0-100)
- Normalized values (0-1)
- String formats for both
Post-Installation
Enable "Focal Point Extension" on the graphQL server configuration and clear caches.
Usage:
query {
node(id: "123") {
... on NodeArticle {
fieldImage {
focalPoint {
x # 50 (percentage)
y # 75 (percentage)
coordinates # "50,75"
xNormalized # 0.5 (0-1 range)
yNormalized # 0.75 (0-1 range)
coordinatesNormalized # "0.5,0.75"
}
url
alt
}
}
}
}