https://github.com/doomcommerce/shopify-search
Shopify search query builder library.
https://github.com/doomcommerce/shopify-search
builder query search shopify syntax
Last synced: 2 months ago
JSON representation
Shopify search query builder library.
- Host: GitHub
- URL: https://github.com/doomcommerce/shopify-search
- Owner: DoomCommerce
- License: agpl-3.0
- Created: 2023-08-30T23:56:33.000Z (over 1 year ago)
- Default Branch: Stable
- Last Pushed: 2023-09-03T11:01:05.000Z (over 1 year ago)
- Last Synced: 2025-03-22T14:42:57.122Z (2 months ago)
- Topics: builder, query, search, shopify, syntax
- Language: TypeScript
- Homepage:
- Size: 80.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Badge NPM]][NPM]
# Shopify Search
Query BuilderCreate search query strings with helper functions.
[![Button Installation]][Installation]
[![Button Usage]][Usage]
[![Button Examples]][Examples]
```ts
import { searchify , include , exclude , and } from '@doomcommerce/shopify-search'const inRange = include({
orders : {
from : 1005 ,
to : 1010
}
})const filterBy = exclude({
channels : [ 'gid://shopify/Channel/183109583163' ] ,
tags : [ 'Custom Shipping Rate' ]
})const query = searchify(and(inRange,filterBy))
console.log(query)
``````txt
( name:>=1005 AND name:<=1010 ) AND ( NOT (
sales_channel:'gid://shopify/Channel/183109583163' )
AND NOT ( tag:'Custom Shipping Rate' ) )
```*Resolved search query will be optimized in the future.*
[Badge NPM]: https://img.shields.io/npm/v/%40doomcommerce%2Fshopify-search?style=for-the-badge&logoColor=white&logo=NPM&labelColor=cb0000&color=950000
[NPM]: https://www.npmjs.com/package/@doomcommerce/shopify-search[Button Installation]: https://img.shields.io/badge/Installation-539c3f?style=for-the-badge&logoColor=white&logo=docusign
[Button Examples]: https://img.shields.io/badge/Examples-14539a?style=for-the-badge&logoColor=white&logo=apacheparquet
[Button Usage]: https://img.shields.io/badge/Usage-b85b4a?style=for-the-badge&logoColor=white&logo=applearcade[Installation]: https://github.com/DoomCommerce/Shopify-Search/tree/Stable/Documentation/Installation.md
[Examples]: https://github.com/DoomCommerce/Shopify-Search/tree/Stable/Examples
[Usage]: https://github.com/DoomCommerce/Shopify-Search/tree/Stable/Documentation/Usage.md