Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

storefront-query-builder

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storefront-query-builder

Storefront Query Builder

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
5
Created
Source

storefront-query-builder

ElasticSearch Query builder from the abstract "SearchQuery" object used by storefront-api, vue-storefront-api and vue-storefront projects.

The idea is, that the user can create the query in a pretty abstract way and get the ElasticSearch or potentially different query in return. Some nice extension ideas could be to add mongodb support or SQL support as well.

Example usage:

import { SearchQuery, elasticsearch } from 'storefront-query-builder'
import bodybuilder from 'bodybuilder'
const searchQuery = new SearchQuery()
searchQuery = searchQuery.applyFilter({key: 'parent_id', value: {'eq': 125 }})
const elasticSearchQuery = await elasticsearch.buildQueryBodyFromSearchQuery({ config, queryChain: bodybuilder(), searchQuery })
// send the `elasticSearchQuery` to ElasticSearch instance

More on storefront-api More on vue-storefront

FAQs

Package last updated on 09 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts