Skip to main content

What would be the graphql query to get items where timeline end date is tomorrow?

  • August 28, 2024
  • 3 replies
  • 30 views

I am using the following rule:

query {
boards(ids: “${boardId}”) {

    items_page(limit: 200,  query_params: {rules: [ { 
    column_id: "${columnId}", compare_value:["TOMORROW"], compare_attribute: "END_DATE", operator: equals}]}) {
           items {
  
    name
    id
    url
  }
        }

    }
  },

However I am getting this following error : Argument ‘operator’ on InputObject ‘ItemsQueryRule’ has an invalid value (equals). Expected type ‘ItemsQueryRuleOperator’.

3 replies

basdebruin
  • Community Expert
  • August 28, 2024

Although the documentation shows “equals” as a valid ItemsQueryRuleOperator, it does not seem to be supported.

You can try this one is you want only the exact end dates for tomorrow.

query_params: {operator: and, rules: [{column_id: "timeline", compare_value: "TOMORROW", compare_attribute: "END_DATE" operator: greater_than_or_equals}, {column_id: "timeline", compare_value: "TOMORROW", compare_attribute: "END_DATE" operator: lower_than_or_equal}]}

  • Author
  • Participating Frequently
  • August 29, 2024

Thank you. That was really helpful.


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • August 30, 2024

@basdebruin is correct!

Apologies for the confusion regarding the EQUALS operator. I am going to remove that from the docs now!

Let us know if you have any other questions.

Best,
Rachel