drupal-graphql / drupal-graphql/graphql

Filter by date GREATER_THAN_OR_EQUAL to "now"

Open
#1,240 1 comment 0 reactions 0 assignees View on GitHub
3.x question
Dominant language
PHP
Stars
287
Forks
198
PR merge metrics
No merged PRs in 30d

Description

I'm using Drupal GraphQL v3 and I simply want to make sure that any article that has a `created` date that in the future doesn't appear in the query. This is my query...

```
{
nodeQuery (
sort: {
field: "created",
direction: DESC,
},
filter: {
conditions: [
{
field: "type",
value: "article",
operator: EQUAL
},
{
field: "created",
operator: GREATER_THAN_OR_EQUAL,
value: "now",
}
]
}
) {
entities {
entityLabel
}
}
}
```

However, I still see articles with dates in the future displayed in my query.

I also tried `field: "entityCreated",` but that (of course) doesn't work. I also simply tried adding the current date manually, but this is not working.

What should my query be to ONLY show articles past the current date/time?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.