groq
TypeScript icon, indicating that this package has built-in type declarations

3.41.1 • Public • Published

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.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i groq

    Weekly Downloads

    143,973

    Version

    3.41.1

    License

    MIT

    Unpacked Size

    8.84 kB

    Total Files

    13

    Last publish

    Collaborators

    • armandocerna
    • daniel.malmer
    • jordanl17
    • tambet
    • jtpetty
    • drewsanity
    • refiito
    • sergeisarviro
    • ash
    • indrek.karner
    • cngonzalez-sanity
    • rdunk
    • rneatherway-sanity
    • ricokahler
    • pedro-sanity
    • jonabc
    • kenjonespizza
    • pauloborgesf
    • binoy14
    • simen.svale
    • svirs
    • josh_sanity_io
    • joneidejohnsen
    • nina.andal
    • rankers
    • snorreeb
    • mattcraig
    • vincentquigley
    • stipsan
    • michael-sanity
    • rubioz
    • tonina
    • ritasdias
    • simeonsanity
    • kmelve
    • bjoerge
    • rexxars
    • skogsmaskin
    • robinpyon
    • mariuslundgard
    • sanity-io
    • evenw
    • radhe_sanity
    • rbotten
    • judofyr
    • obliadp
    • dcilke
    • fredcarlsen
    • hermanw
    • sgulseth
    • atombender
    • simenss