the-events-calendar / ql-events

The Events Calendar binding to WPGraphQL
15 stars 7 forks source link

Query by event dates #5

Closed kidunot89 closed 4 years ago

kidunot89 commented 4 years ago

Adds startDateQuery and endDateQuery arguments to the Event connections. Its function my be a little different from dateQuery which using the same input type but isn't based upon a meta value.

Example usage

query {
  events( where: {startDateQuery: {
    year: 2019
    month: 8
    day: 12
    hour: 23
    minute: 2
    second: 40
    compare: "after"
  }}) {
    ...event connection fields
  }
}
query {
  events( where: {startDateQuery: {
    after: {
      month: 8
      day: 23
    }
  }}) {
    ...event connection fields
  }
}