FROM CACHE - en_header

GraphQL - NOT Query can not work with Field search?

Solved
MR_DEVELOPERS
Shopify Partner
6 0 5

Hi

From shopify graphql Document, I found this: "the minus sign must precede the field, value, or subquery e.g. -field:value -value -(subquery)."

But this not working:

Screen Shot 2021-08-18 at 8.39.04 AM.png

I am trying to get products which does not include 'Apparel' in product tags, but it doesn't working well with the query variable above

Could someone help with the query syntax?

Thanks a lot

Barrick

Accepted Solution (1)

Accepted Solutions
csam
Shopify Staff
Shopify Staff
267 40 44

This is an accepted solution.

Hi @MR_DEVELOPERS 

The syntax that you'll want to use is "-tag:Apparel" rather than "-tags:Apperal"  🙂

There's a good walkthrough with a video tutorial that has a few examples here: https://www.shopify.ca/partners/blog/query-argument-graphql

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)
csam
Shopify Staff
Shopify Staff
267 40 44

This is an accepted solution.

Hi @MR_DEVELOPERS 

The syntax that you'll want to use is "-tag:Apparel" rather than "-tags:Apperal"  🙂

There's a good walkthrough with a video tutorial that has a few examples here: https://www.shopify.ca/partners/blog/query-argument-graphql

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog