Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Dec 18, 2020
1 parent ca784d1 commit 69bc4a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export default createClient<Documents>({
previewMode: true,
// (optional) only required if your dataset is private or if you want to use preview mode
token: '...',
// by default sanity-codegen caches responses in memory. this can be disabled if desired
// disabledCache: true,
});
```

Expand Down Expand Up @@ -140,6 +142,12 @@ function expand<T>(ref: SanityReference<T>): Promise<R>;
* provided by you.
*/
function query<T = any>(query: string): Promise<T[]>;

/**
* Clears the in-memory cache. The cache can also be disabled when creating
* the client
*/
function clearCache(): void;
```

The design behind the client is to fetch full documents and handle projections and transforms in code.
Expand Down

0 comments on commit 69bc4a9

Please sign in to comment.