Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasKn committed Feb 3, 2024
2 parents fa079ff + e1d3ff1 commit d63002c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/lib/sanity/sanity.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
ContentSourceMap,
FilteredResponseQueryOptions,
QueryParams,
SanityStegaClient,
SanityClient,
UnfilteredResponseQueryOptions,
} from '@sanity/client/stega';
import type {BaseQuery, InferType, z} from 'groqd';
Expand Down Expand Up @@ -31,7 +31,7 @@ type BaseType<T = any> = z.ZodType<T>;
type GroqdQuery = BaseQuery<BaseType<any>>;

export type Sanity = {
client: SanityStegaClient;
client: SanityClient;
query<T extends GroqdQuery>(options: {
cache?: CachingStrategy;
groqdQuery: T;
Expand All @@ -56,9 +56,7 @@ export function createSanityClient(options: CreateSanityClientOptions) {
typeof projectId === 'undefined' ||
typeof apiVersion === 'undefined' ||
typeof dataset === 'undefined' ||
typeof studioUrl === 'undefined' ||
typeof useCdn === 'undefined' ||
typeof useStega === 'undefined'
typeof studioUrl === 'undefined'
) {
throw new Error('Missing required configuration for Sanity client');
}
Expand All @@ -68,8 +66,8 @@ export function createSanityClient(options: CreateSanityClientOptions) {
dataset,
projectId,
studioUrl,
useCdn,
useStega,
useCdn: useCdn ?? true,
useStega: useStega ?? 'true',
});

if (!sanityServerClientHasBeenInitialized) {
Expand Down

0 comments on commit d63002c

Please sign in to comment.