Hi there,
I running into a strange situatie where my query doesn't work on when deploying my Next.js application with Vercel. I have 2 slices on my homepage which I try to query (Masonry and Card). When I run the build locally everything works as expected and it's build. However when I push my code to the server I see this error in my build:
Query does not pass validation. Violations:
10:21:57.691 Cannot query field 'allHomepages' on type 'Query'. (line 3, column 7):
10:21:57.691 allHomepages {
10:21:57.691 ^
10:21:57.691 Unknown type 'HomepageBodyMasonry'. (line 20, column 22):
10:21:57.691 ... on HomepageBodyMasonry {
10:21:57.691 ^
10:21:57.691 Unknown type 'HomepageBodyCard'. (line 34, column 22):
10:21:57.691 ... on HomepageBodyCard {
10:21:57.691 ^
My query is as followed:
{
allHomepages {
edges {
node {
_meta {
uid
}
body {
... on HomepageBodyMasonry {
type
primary {
title
description
full_width
}
fields {
img
img_title
img_desc
size
}
}
... on HomepageBodyCard {
type
primary {
title
}
fields {
full_width
img
img_first
title
title_center
body1
text_center
}
}
__typename
}
}
}
}
}
I checked if my env variables are working as expected in Vercel and everything seems to be fine. Anyone know if im doing anything weird query or sees any weird code?
Thanks in advance