Move imageMeta to field on top level File object to solve deprecation warning

This commit is contained in:
2021-07-11 20:51:23 -07:00
parent 2c407ee41f
commit 039df7958c
8 changed files with 771 additions and 632 deletions

View File

@@ -175,13 +175,8 @@ const IndexPage = ({ data: { allFile: { edges } } }) => {
export const query = graphql`
{
allFile(
filter: {
sourceInstanceName: {eq: "gallery"},
# images that don't work well
# base: {nin: ["DSC06517.jpg"]}
# childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {lte: 1.3}}}}
},
sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken}
filter: { sourceInstanceName: {eq: "gallery"} }
sort: {order: DESC, fields: fields___imageMeta___dateTaken}
) {
edges {
node {
@@ -196,11 +191,11 @@ export const query = graphql`
placeholder: NONE
breakpoints: [750, 1080, 1366, 1920, 2560]
)
fields {
imageMeta {
vibrant {
...VibrantColors
}
}
fields {
imageMeta {
vibrant {
...VibrantColors
}
}
}

View File

@@ -56,33 +56,26 @@ export const query = graphql`
query GalleryPageQuery {
allFile(
filter: { sourceInstanceName: { eq: "gallery" } }
sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken}
sort: {order: DESC, fields: fields___imageMeta___dateTaken}
) {
edges {
node {
relativePath,
base,
relativePath
base
childImageSharp{
fluid {
aspectRatio
},
}
gatsbyImageData(
layout: CONSTRAINED,
layout: CONSTRAINED
height: 550
)
fields {
imageMeta {
dateTaken
iptc {
# caption
object_name
}
# exif {
# FNumber
# ExposureTime
# ShutterSpeedValue
# ISO
# }
}
fields {
imageMeta {
dateTaken
iptc {
object_name
}
}
}