Skip to content

BETWEEN Type not working, MetaArray value needs to accept Array values? #14

@a-zog

Description

@a-zog

Hi, thank you for the great work you've did !

I would like to have a query that returns all the "Events" that are happening during the next weekend.

This is the query I've crafted:

query getEvents(
  $perpage: Int!
  $weekend_start: String!
  $weekend_end: String!
  $after: String
) {
  this_weekend: events(
    first: $perpage
    after: $after
    where: {
      metaQuery: {
        relation: OR
        metaArray: [
          {
            key: "date_start"
            compare: BETWEEN
            value: [$weekend_start, $weekend_end]
          }
          {
            key: "date_end"
            compare: BETWEEN
            value: [$weekend_start, $weekend_end]
          }
        ]
      }
    }
  ) {
    nodes {
      __typename
      date
      title
    }
  }
}

I've encountered an "Internal server error" issue.
I suspect that is due to the fact that the value property doesn't accept array values.

Would you please help me with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions