'Gridsome's GraphQL Between filter does not work
*I am Japanese. My English is not good, so I translate with Deepl.
I made my blog with Gridsome. I am trying to create a monthly archive page on that blog, but the filter between does not work in PlayGround.
The actual code is as follows (I am trying to get the articles posted in July 2021)
Query
query PostsByDate($periodStartDate: Date, $periodEndDate: Date) {
years: allPost(filter: {date: {between: [$periodStartDate, $periodEndDate]} }) {
edges {
node {
id
title
path
date(format: "YYYY/MM/DD")
}
}
}
}
Variables
{
"periodStartDate": "2021-07-01T00:00:00.000Z",
"periodEndDate": "2021-07-31T23:59:59.999Z"
}
Result
{
"data": {
"years": {
"edges": []
}
}
}
An article submitted in July 2021 exists but does not appear in the results. Is there anywhere I am wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
