Skip to content

Commit

Permalink
feat(core): init graphql.tada (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
deini committed Mar 15, 2024
1 parent 46b0656 commit be5fc87
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-cheetahs-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": minor
---

export a graphql() powered by gql.tada
16 changes: 16 additions & 0 deletions apps/core/client/graphql.ts
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit be5fc87

Please sign in to comment.