Sanity Library Reference Docs
    Preparing search index...

    Interface ClientOptions

    Options used when retrieving a client instance from the client store.

    This interface extends the base ClientConfig and adds:

    • apiVersion: A required string indicating the API version for the client.
    • scope: An optional flag to choose between the project-specific client ('project') and the global client ('global'). When set to 'global', the global client is used.

    These options are utilized by getClient and getClientState to configure and return appropriate client instances that automatically handle authentication updates and configuration changes.

    interface ClientOptions {
        apiVersion: string;
        scope?: "global" | "default";
    }

    Hierarchy

    • Pick<ClientConfig, AllowedClientConfigKey>
      • ClientOptions
    Index

    Properties

    Properties

    apiVersion: string

    A required string indicating the API version for the client.

    scope?: "global" | "default"

    An optional flag to choose between the default client (typically project-level) and the global client ('global'). When set to 'global', the global client is used.