MCPcopy Create free account
hub / github.com/dailydotdev/apps / fetchPricingPreview

Function fetchPricingPreview

packages/shared/src/graphql/paddle.ts:117–128  ·  view source on GitHub ↗
(
  type: PurchaseType,
  locale = globalThis?.navigator?.language ?? 'en-US',
  discountId?: string,
)

Source from the content-addressed store, hash-verified

115}
116
117export const fetchPricingPreview = async (
118 type: PurchaseType,
119 locale = globalThis?.navigator?.language ?? 'en-US',
120 discountId?: string,
121): Promise<ProductPricingPreview[]> => {
122 const { pricingPreview } = await gqlClient.request<PricingPreviewResponse>(
123 PRICING_PREVIEW_QUERY,
124 { type, locale, discountId },
125 );
126
127 return pricingPreview ?? [];
128};
129
130const PRICING_PREVIEW_BY_IDS_QUERY = gql`
131 query PricingPreviewByIds(

Callers 4

coresPricesQueryOptionsFunction · 0.90
useProductPricingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected