Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 2.82 KB

_README.md

File metadata and controls

61 lines (40 loc) · 2.82 KB

@sanity-typed/next-sanity

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

GitHub Sponsors

next-sanity with typed GROQ Results

@[:page_toc](## Page Contents)

Install

npm install next-sanity @sanity-typed/next-sanity

Usage

Use createClient exactly as you would from @sanity-typed/client.

@typescript @typescript @typescript

@:markdown

Considerations

@:markdown @:markdown @:markdown @:markdown

Breaking Changes

2 to 3

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.

1 to 2

No more createClient<SanityValues>()(config)

Removing the double function signature from createClient:

- const client = createClient<SanityValues>()({
+ const client = createClient<SanityValues>({
  // ...
});

We no longer derive types from your config values. Most of the types weren't significant, but the main loss will be _originalId when the perspective was "previewDrafts".