Skip to content

Commit

Permalink
clean up more direct gql access
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Dec 15, 2024
1 parent b9e745d commit 25326a8
Show file tree
Hide file tree
Showing 52 changed files with 448 additions and 212 deletions.
2 changes: 1 addition & 1 deletion apps/gnocchi/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@vitejs/plugin-react-swc": "^3.5.0",
"concurrently": "^7.5.0",
"dotenv": "^16.0.1",
"typescript": "5.7.2",
"typescript": "5.5.3",
"unocss": "^0.58.0",
"vite": "^5.0.10"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/gnocchi/verdant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@verdant-web/react": "40.1.0",
"@verdant-web/store": "4.1.0",
"cuid": "^2.1.8",
"gql.tada": "1.8.10",
"gql.tada": "1.8.2",
"stopword": "^2.0.8"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions apps/gnocchi/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"date-fns": "^2.29.3",
"downshift": "9.0.6",
"fractional-indexing": "^3.0.1",
"gql.tada": "1.8.10",
"gql.tada": "1.8.2",
"jotai": "^1.13.0",
"just-mix": "^0.3.3",
"pako": "^2.1.0",
Expand Down Expand Up @@ -95,7 +95,7 @@
"dotenv": "^16.0.1",
"fs-extra": "^11.1.0",
"prettier": "^2.8.4",
"typescript": "5.7.2",
"typescript": "5.5.3",
"unocss": "^0.58.0",
"vite": "^5.0.10",
"vite-plugin-checker": "^0.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
PeopleListItem,
} from '@/components/sync/people/People.jsx';
import { PersonAvatar } from '@/components/sync/people/PersonAvatar.jsx';
import { graphql } from '@/graphql.js';
import { useLocalStorage } from '@/hooks/useLocalStorage.js';
import { hooks } from '@/stores/groceries/index.js';
import {
Expand All @@ -31,7 +32,7 @@ import {
useHasServerAccess,
useIsLoggedIn,
} from '@biscuits/client';
import { graphql, useQuery } from '@biscuits/graphql';
import { useQuery } from '@biscuits/graphql';
import { Recipe } from '@gnocchi.biscuits/verdant';
import { Cross2Icon } from '@radix-ui/react-icons';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TextLink } from '@/components/nav/Link.jsx';
import { graphql } from '@/graphql.js';
import { hooks } from '@/stores/groceries/index.js';
import {
Button,
Expand All @@ -14,7 +15,7 @@ import {
Tooltip,
} from '@a-type/ui';
import { useFeatureFlag, useHasServerAccess } from '@biscuits/client';
import { graphql, useMutation, useQuery } from '@biscuits/graphql';
import { useMutation, useQuery } from '@biscuits/graphql';
import { Recipe } from '@gnocchi.biscuits/verdant';
import { format } from 'date-fns/esm';
import { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/humding/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/react-dom": "^19.0.2",
"@unocss/transformer-variant-group": "^0.58.0",
"@vitejs/plugin-react-swc": "3.5.0",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.2.11",
"vite-plugin-pwa": "^0.19.8"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/marginalia/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/unist": "^3.0.2",
"@unocss/transformer-variant-group": "^0.58.0",
"@vitejs/plugin-react-swc": "3.5.0",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.2.11",
"vite-plugin-pwa": "^0.19.8"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/names/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/react-dom": "^19.0.2",
"@unocss/transformer-variant-group": "^0.65.1",
"@vitejs/plugin-react-swc": "3.7.2",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.3.1",
"vite-plugin-pwa": "^0.20.0"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/palette/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/react-dom": "^19.0.2",
"@unocss/transformer-variant-group": "^0.65.1",
"@vitejs/plugin-react-swc": "3.7.2",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.3.1",
"vite-plugin-pwa": "^0.20.0"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/star-chart/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/react-dom": "^19.0.2",
"@unocss/transformer-variant-group": "^0.58.0",
"@vitejs/plugin-react-swc": "3.7.2",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "6.0.3",
"vite-plugin-pwa": "^0.19.8"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/trip-tick/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"classnames": "^2.3.2",
"date-fns": "^2.30.0",
"downshift": "^7.0.1",
"gql.tada": "1.8.10",
"gql.tada": "1.8.2",
"pluralize": "^8.0.0",
"react": "19.0.0",
"react-dom": "^19.0.0",
Expand All @@ -48,7 +48,7 @@
"@types/react-dom": "^19.0.2",
"@unocss/preset-icons": "^0.55.7",
"@vitejs/plugin-react-swc": "^3.5.0",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.2.7",
"vite-plugin-pwa": "0.19.7"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/trip-tick/web/src/components/trips/TripItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
getComputedQuantity,
quantityForecast,
} from '@/components/trips/utils.js';
import { ResultOf } from '@/graphql.js';
import { hooks } from '@/store.js';
import {
Button,
Expand All @@ -15,7 +16,6 @@ import {
SliderTrack,
useParticles,
} from '@a-type/ui';
import { ResultOf } from '@biscuits/graphql';
import {
ListItemsItem,
TripCompletionsValue,
Expand Down
3 changes: 2 additions & 1 deletion apps/trip-tick/web/src/components/trips/TripView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AddListsPicker } from '@/components/trips/AddListsPicker.jsx';
import { useTripDays, useTripProgress } from '@/components/trips/hooks.js';
import { FragmentOf, graphql } from '@/graphql.js';
import { hooks } from '@/store.js';
import {
Button,
Expand All @@ -13,7 +14,7 @@ import {
TabsTrigger,
} from '@a-type/ui';
import { useLocalStorage, usePageTitle } from '@biscuits/client';
import { FragmentOf, graphql, useQuery } from '@biscuits/graphql';
import { useQuery } from '@biscuits/graphql';
import * as Progress from '@radix-ui/react-progress';
import {
List,
Expand Down
3 changes: 2 additions & 1 deletion apps/trip-tick/web/src/components/weather/LocationSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { graphql } from '@/graphql.js';
import { hooks } from '@/store.js';
import {
Button,
Expand All @@ -11,7 +12,7 @@ import {
} from '@a-type/ui';
import { preventDefault } from '@a-type/utils';
import { useDebounced, useHasServerAccess } from '@biscuits/client';
import { graphql, useClient, useQuery } from '@biscuits/graphql';
import { useClient, useQuery } from '@biscuits/graphql';
import { TripLocation, TripLocationInit } from '@trip-tick.biscuits/verdant';
import classNames from 'classnames';
import { useCombobox } from 'downshift';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ResultOf, graphql } from '@/graphql.js';
import {
Chip,
CollapsibleContent,
CollapsibleRoot,
CollapsibleTrigger,
Icon,
} from '@a-type/ui';
import { ResultOf, graphql } from '@biscuits/graphql';
import classNames from 'classnames';
import { TemperatureUnit } from './TemperatureUnit.jsx';
import { useTemperatureUnit } from './useTemperatureUnit.js';
Expand Down
3 changes: 3 additions & 0 deletions apps/trip-tick/web/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ export const graphql = initGraphQLTada<{
JSON: any;
};
}>();

export { maskFragments, readFragment } from 'gql.tada';
export type { FragmentOf, ResultOf, VariablesOf } from 'gql.tada';
2 changes: 1 addition & 1 deletion apps/wish-wash/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"@types/react-dom": "^19.0.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"typescript": "5.7.2"
"typescript": "5.5.3"
}
}
2 changes: 1 addition & 1 deletion apps/wish-wash/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@vitejs/plugin-react-swc": "^3.7.2",
"concurrently": "^7.5.0",
"dotenv": "^16.0.1",
"typescript": "5.7.2",
"typescript": "5.5.3",
"unocss": "^0.58.0",
"vite": "^5.0.10"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/wish-wash/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"@vitejs/plugin-react-swc": "3.7.0",
"typescript": "5.7.2",
"typescript": "5.5.3",
"vite": "5.3.1",
"vite-plugin-circular-dependency": "^0.2.1",
"vite-plugin-pwa": "^0.19.8"
Expand Down
5 changes: 3 additions & 2 deletions apps/wish-wash/web/src/components/items/ItemEditDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { graphql } from '@/graphql.js';
import { hooks } from '@/hooks.js';
import {
Button,
Expand All @@ -17,7 +18,7 @@ import {
} from '@a-type/ui';
import { preventDefault } from '@a-type/utils';
import { useHasServerAccess } from '@biscuits/client';
import { graphql, useLazyQuery } from '@biscuits/graphql';
import { useLazyQuery } from '@biscuits/graphql';
import { useSearchParams } from '@verdant-web/react-router';
import {
Item,
Expand Down Expand Up @@ -74,7 +75,7 @@ function ItemEditor({ item }: { item: Item }) {
case 'idea':
content = <IdeaEditor item={item} />;
break;
case 'product':
case 'link':
content = <ProductEditor item={item} />;
break;
case 'vibe':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { graphql } from '@/graphql.js';
import {
ActionButton,
ActionButtonProps,
Expand All @@ -13,7 +14,7 @@ import {
P,
} from '@a-type/ui';
import { useHasServerAccess } from '@biscuits/client';
import { graphql, useMutation, useQuery } from '@biscuits/graphql';
import { useMutation, useQuery } from '@biscuits/graphql';
import { Link } from '@verdant-web/react-router';
import { upsellState } from '../promotion/upsellState.js';

Expand Down
2 changes: 1 addition & 1 deletion blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@unocss/reset": "^0.59.4",
"@unocss/transformer-variant-group": "^0.59.4",
"astro": "^4.7.1",
"typescript": "5.7.2",
"typescript": "5.5.3",
"unocss": "^0.59.4"
}
}
62 changes: 31 additions & 31 deletions cdk/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "@biscuits/cdk",
"version": "0.1.0",
"bin": {
"cdk": "bin/cdk.js"
},
"scripts": {
"build:cdk": "tsc",
"watch": "tsc -w",
"test": "vitest",
"cdk-raw": "cdk",
"cdk": "env-cmd tsx ./bin/wrapper.ts"
},
"devDependencies": {
"@types/node": "20.12.7",
"aws-cdk": "2.141.0",
"ts-node": "^10.9.2",
"tsx": "^4.10.4",
"typescript": "5.7.2",
"vitest": "1.6.0"
},
"dependencies": {
"@aws-sdk/client-acm": "^3.583.0",
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.57.0",
"@biscuits/apps": "workspace:*",
"@octokit/rest": "^20.1.1",
"aws-cdk-lib": "2.141.0",
"constructs": "^10.0.0",
"dotenv": "16.4.5",
"env-cmd": "10.1.0",
"source-map-support": "^0.5.21"
}
"name": "@biscuits/cdk",
"version": "0.1.0",
"bin": {
"cdk": "bin/cdk.js"
},
"scripts": {
"build:cdk": "tsc",
"watch": "tsc -w",
"test": "vitest",
"cdk-raw": "cdk",
"cdk": "env-cmd tsx ./bin/wrapper.ts"
},
"devDependencies": {
"@types/node": "20.12.7",
"aws-cdk": "2.141.0",
"ts-node": "^10.9.2",
"tsx": "^4.10.4",
"typescript": "5.5.3",
"vitest": "1.6.0"
},
"dependencies": {
"@aws-sdk/client-acm": "^3.583.0",
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.57.0",
"@biscuits/apps": "workspace:*",
"@octokit/rest": "^20.1.1",
"aws-cdk-lib": "2.141.0",
"constructs": "^10.0.0",
"dotenv": "16.4.5",
"env-cmd": "10.1.0",
"source-map-support": "^0.5.21"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"kill-port": "2.0.1",
"prettier": "3.2.5",
"turbo": "^1.9.3",
"typescript": "5.7.2"
"typescript": "5.5.3"
},
"volta": {
"node": "22.12.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@biscuits/libraries": "workspace:*",
"@stripe/react-stripe-js": "2.7.3",
"@stripe/stripe-js": "4.2.0",
"gql.tada": "1.8.10"
"gql.tada": "1.8.2"
},
"peerDependencies": {
"@a-type/ui": "^1.0.0",
Expand All @@ -84,7 +84,7 @@
"@verdant-web/store": "4.1.0",
"copy": "^0.3.2",
"react": "19.0.0",
"typescript": "5.7.2",
"typescript": "5.5.3",
"unocss": "^0.58.0",
"vite-plugin-pwa": "0.19.2"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/client/src/components/SubscriptionPromotion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import {
DialogTitle,
Icon,
} from '@a-type/ui';
import { graphql, useQuery } from '@biscuits/graphql';
import { useQuery } from '@biscuits/graphql';
import { ReactNode } from 'react';
import { proxy, useSnapshot } from 'valtio';
import { graphql } from '../graphql.js';
import { LoginButton } from './LoginButton.js';
import { Price } from './Price.js';

Expand Down
3 changes: 2 additions & 1 deletion packages/client/src/components/TosPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import {
DialogContent,
DialogTitle,
} from '@a-type/ui';
import { graphql, useMutation } from '@biscuits/graphql';
import { useMutation } from '@biscuits/graphql';
import * as CONFIG from '../config.js';
import { graphql } from '../graphql.js';
import { useMe } from '../hooks/graphql.js';
import { TOS_UPDATED_AT } from '../tos.js';

Expand Down
3 changes: 2 additions & 1 deletion packages/client/src/components/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import {
ErrorBoundary,
Icon,
} from '@a-type/ui';
import { graphql, useSuspenseQuery } from '@biscuits/graphql';
import { useSuspenseQuery } from '@biscuits/graphql';
import { ReactNode, Suspense } from 'react';
import * as CONFIG from '../config.js';
import { graphql } from '../graphql.js';
import {
useHasServerAccess,
useIsLoggedIn,
Expand Down
Loading

0 comments on commit 25326a8

Please sign in to comment.