Skip to content

Commit

Permalink
docs: clarify api perspective change
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Feb 12, 2025
1 parent 7485afd commit adeb946
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const exp = defineCreateClientExports<SanityClient, ClientConfig>(envMiddleware,
/** @public */
export const requester = exp.requester

/** @public */
/**
* @remarks
* As of API version `v2025-02-19`, the default perspective used by the client has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/TODO|Changelog}
* @public
*/
export const createClient = exp.createClient

/**
Expand Down
12 changes: 11 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,19 @@ export interface ClientConfig {
/** @defaultValue true */
useCdn?: boolean
token?: string
/** @defaultValue 'published' if API version >= v2025-02-19, 'raw' if apiVersion < v2025-02-19 */

/**
* @remarks
* As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/TODO|Changelog}
* @defaultValue 'published'
*/
perspective?: ClientPerspective
apiHost?: string

/**
@remarks
* As of API version `v2025-02-19`, the default perspective has changed from `raw` to `published`. {@link https://www.sanity.io/changelog/TODO|Changelog}
*/
apiVersion?: string
proxy?: string

Expand Down

0 comments on commit adeb946

Please sign in to comment.