Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

how to filter orders by tags graphql

Solved

how to filter orders by tags graphql

hmjeh
Tourist
11 3 0

 

 

query { orders(first:30, query:" -node.tags[0]:'handdle'")
{ 
edges 
{ node 
{ tags 
} 
} 
}
 }

 

 

and i got

 

 

 

 

{
  "data": {
    "orders": {
      "edges": [
        {
          "node": {
            "tags": [
              "handdle"
            ]
          }
        },
        {
          "node": {
            "tags": []
          }
        },
        {
          "node": {
            "tags": [
              "handdle"
            ]
          }
        },
        {
          "node": {
            "tags": []
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 32,
      "actualQueryCost": 6,
      "throttleStatus": {
        "maximumAvailable": 1000.0,
        "currentlyAvailable": 994,
        "restoreRate": 50.0
      }
    }
  }
}

 

 

 

 

 i expecting to get only order with out content "handdle"

but unfortunately

i got everting

Accepted Solution (1)

hmjeh
Tourist
11 3 0

This is an accepted solution.

i find out how to resolve this prublem 

i make mistake in my query

hear's how the query shold to bi 

 

 

 

query {
      orders(first:30, query:"-tag:'handdle'"){

 

View solution in original post

Reply 1 (1)

hmjeh
Tourist
11 3 0

This is an accepted solution.

i find out how to resolve this prublem 

i make mistake in my query

hear's how the query shold to bi 

 

 

 

query {
      orders(first:30, query:"-tag:'handdle'"){