diff --git a/.changeset/fair-cheetahs-relate.md b/.changeset/fair-cheetahs-relate.md new file mode 100644 index 000000000..07ac93e60 --- /dev/null +++ b/.changeset/fair-cheetahs-relate.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": minor +--- + +export a graphql() powered by gql.tada diff --git a/apps/core/client/graphql.ts b/apps/core/client/graphql.ts new file mode 100644 index 000000000..a47f30abf --- /dev/null +++ b/apps/core/client/graphql.ts @@ -0,0 +1,16 @@ +import { initGraphQLTada } from 'gql.tada'; + +import type { introspection } from '~/graphql-env'; + +export const graphql = initGraphQLTada<{ + introspection: introspection; + scalars: { + DateTime: string; + Long: number; + BigDecimal: number; + }; + disableMasking: true; +}>(); + +export type { FragmentOf, ResultOf, VariablesOf } from 'gql.tada'; +export { readFragment } from 'gql.tada';