Socket
Socket
Sign inDemoInstall

groq

Package Overview
Dependencies
0
Maintainers
52
Versions
821
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    groq

Tagged template literal for Sanity.io GROQ-queries


Version published
Maintainers
52
Created

Readme

Source

GROQ tagged template literal

This module exports a single function that can be called with an ES2015 template string to signal that it represents a GROQ-query.

The result will be the exact same string as the input, - this is currently helpful for getting syntax highlighting in editors, but in the future it might also parse and validate queries, strip unncessary whitespace and similar.

Pairs well with vscode-sanity!

Installing

npm install --save groq

Usage

import groq from 'groq'

const query = groq`*[_type == 'products'][0...10]`

What is Sanity? What is GROQ?

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches.

To get started with Sanity, please head over to our getting started guide

License

MIT-licensed. See LICENSE.

Keywords

FAQs

Last updated on 26 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc