GRAPHQL Suggestion/Enhancement

Highlighted
Shopify Expert
4186 29 409

When setting up some rules, where we can choose a thing, for example a product TAG, there are operators we can choose from. So we can setup a Collection Create Rule like:

 

When a Product TAG EQUALS "Fizzbuzz" add it to this collection.

The thing is, it would be nice to have that EQUALS operator be case-insensitive or case-sensitive. At this time we just get a dead equals. Knowing how this could be abused is the issue. If I could care a less, and I know the idea is that if the tag is "FiZZbuzz or fizzbuzz or FIZZBuzz", then the use of EQUALS but case insensitive would be great!

I have not dug a deep enough hole yet into GQL to know if that is thing, but if it is, could that please be an enhancement to the library. I can already see how me setting up rules in collections will cause conniptions when the merchant accidentally (of course) sets a tag in the wrong-case but is otherwise perfect.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Partner
530 38 109

Good observation! Looking over the comparison operations (https://shopify.dev/docs/admin-api/graphql/reference/object/collectionrulerelation) they aren't very flexible when it comes to strings. You think that T-SQL is usually case insensitive for example. I know that this is a different platform entirely! Plus other GraphQL implementations provide the full gambit of comparison operators. Like these --> https://hasura.io/docs/1.0/graphql/manual/api-reference/graphql-api/query.html#operator

0 Likes
Highlighted
Shopify Expert
4186 29 409

PostgreSQL rules for this. I use the regular expression like syntax daily in dealing with data. I cannot tell how many times I have used ILIKE or ~* operators and to find all of a sudden I am handcuffed to an EQUAL rule is like, brrrrrk.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes