studioespresso / craft-date-range

Date range field for Craft CMS
MIT License
12 stars 6 forks source link

Added isFuture / isPast / isOngoing graphQL arguments to Crafts entries queries. #28

Closed MrHesus closed 3 years ago

MrHesus commented 3 years ago

I have added new query arguments to work with the date range plugin, these are added to Crafts entries queries. The Twig functionalities won't be effected.

Example:

query events {
  entries(
    section: "educationAndEvents", 
    isFuture: ["dateRange_fieldHandle", true]
  ) {
    id
    title
    dateRange {
      start
      isFuture
    }
  }
}
janhenckens commented 3 years ago

Thanks @MrHesus, really appreciate the effort! Merged & release