Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 2.84 KB

_README.md

File metadata and controls

57 lines (36 loc) · 2.84 KB

@sanity-typed/groq-js

NPM Downloads GitHub commit activity (branch) GitHub Repo stars GitHub contributors GitHub issues by-label Minified Size License

GitHub Sponsors

groq-js with typed GROQ Results

@[:page_toc](## Page Contents)

Install

npm install groq-js @sanity-typed/groq-js

Usage

Use parse and evaluate exactly as you would from groq-js. Then, use the results with the typescript types!

Typically, this isn't used directly, but via @sanity-typed/client-mock's methods that produce groq results. But it can be done directly:

@typescript

Breaking Changes

1 to 2

Typescript version from 5.4.2 <= x <= 5.6.3

The supported Typescript version is now 5.4.2 <= x <= 5.6.3. Older versions are no longer supported and newer versions will be added as we validate it.

Considerations

Using your derived types

You can also use your typed schema to keep parity with the types your typed client would receive.

npm install sanity groq-js @sanity-typed/types @sanity-typed/groq-js

@typescript @typescript @typescript

@:markdown @:markdown

@:markdown @:markdown