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

Function fetchPricingPreview

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

Source from the content-addressed store, hash-verified

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

Callers 4

coresPricesQueryOptionsFunction · 0.90
useProductPricingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected