From 7691b8ec7022395627edd2fe56f0210bf8275bf9 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Mon, 1 Jul 2024 18:22:32 -0700 Subject: [PATCH] gql cleanup --- backend/package.json | 2 +- backend/src/api/resolver/greeting.ts | 6 +- backend/src/db/runMigrations.ts | 27 +---- common/.gitignore | 2 +- common/src/gql.ts | 2 - graphql/codegen-config.cjs | 50 --------- graphql/codegen.ts | 8 +- package.json | 10 +- pnpm-lock.yaml | 161 ++++++++++++++------------- sst.config.ts | 8 +- stacks/index.ts | 1 - tsconfig.json | 6 +- web/app/ui/TestGql.tsx | 7 +- web/tsconfig.json | 3 +- 14 files changed, 113 insertions(+), 180 deletions(-) delete mode 100644 common/src/gql.ts delete mode 100644 graphql/codegen-config.cjs diff --git a/backend/package.json b/backend/package.json index e57866e..0355e5a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -38,7 +38,7 @@ "memoizee": "^0.4.15" }, "devDependencies": { - "@chax-at/transactional-prisma-testing": "^0.5.0", + "@chax-at/transactional-prisma-testing": "^1.2.0", "@faker-js/faker": "^7.5.0", "@types/aws-lambda": "^8.10.70", "@types/memoizee": "^0.4.7", diff --git a/backend/src/api/resolver/greeting.ts b/backend/src/api/resolver/greeting.ts index 1acf898..0e270ed 100644 --- a/backend/src/api/resolver/greeting.ts +++ b/backend/src/api/resolver/greeting.ts @@ -2,19 +2,19 @@ import { defaultAppSyncMiddleware } from '@backend/middleware/lambda'; import { logger } from '@backend/util/logger'; import { incrementMetric } from '@backend/util/metrics'; import { AppSyncResolverEvent } from 'aws-lambda'; -import { GQL } from '@common/index'; +import { GreetingResponse, GreetingState, MutationGreetArgs } from 'common/generated/graphql/graphql'; export const GREETING = 'Yo yo'; // sample query -export const getGreeting = (): GQL.GreetingState => ({ +export const getGreeting = (): GreetingState => ({ currentGreeting: GREETING, }); // sample mutation export const greetInner = async ({ arguments: { name }, -}: AppSyncResolverEvent): Promise => { +}: AppSyncResolverEvent): Promise => { incrementMetric('SaidHello'); logger.debug('Saying greeting to', { name }); diff --git a/backend/src/db/runMigrations.ts b/backend/src/db/runMigrations.ts index 3882bbe..0144319 100644 --- a/backend/src/db/runMigrations.ts +++ b/backend/src/db/runMigrations.ts @@ -7,37 +7,18 @@ import { Migrate } from '@prisma/migrate/dist/Migrate.js'; import { ensureDatabaseExists } from '@prisma/migrate/dist/utils/ensureDatabaseExists'; import { printFilesFromMigrationIds } from '@prisma/migrate/dist/utils/printFiles'; import chalk from 'chalk'; -import { isProd, sleep } from '@common/index'; import { GetSecretValueCommand, SecretsManagerClient } from '@aws-sdk/client-secrets-manager'; import { Prisma, PrismaClient } from '@prisma/client'; +import { isProd } from '@common/env'; export const handler = async (): Promise => { const schemaPath = '/var/task/backend/prisma/schema.prisma'; const dbUrl = await loadDatabaseUrl(); // get DB connection - try { - await createDbIfNotExists(dbUrl); - const client = new PrismaClient(); - await client.$connect(); - } catch (ex) { - const errorCode = (ex as Prisma.PrismaClientInitializationError).errorCode; - if (errorCode == 'P1001') { - // timed out waiting to reach DB server - // it might be waking up from slumber - // so retry in a short bit - console.warn('Database not yet available, retrying...'); - await sleep(30_000); - console.info('Retrying...'); - - await createDbIfNotExists(dbUrl); - const client = new PrismaClient(); - await client.$connect(); - } else { - console.error('Failed to run database migrations'); - throw ex; - } - } + await createDbIfNotExists(dbUrl); + const client = new PrismaClient(); + await client.$connect(); process.env.DATABASE_URL = dbUrl; diff --git a/common/.gitignore b/common/.gitignore index d676969..0d77c88 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -1,2 +1,2 @@ node_modules/ -graphql/generated +generated diff --git a/common/src/gql.ts b/common/src/gql.ts deleted file mode 100644 index 46097ad..0000000 --- a/common/src/gql.ts +++ /dev/null @@ -1,2 +0,0 @@ -// import this for all graphql types -export * as GQL from '../graphql/generated/index'; diff --git a/graphql/codegen-config.cjs b/graphql/codegen-config.cjs deleted file mode 100644 index 3f0f743..0000000 --- a/graphql/codegen-config.cjs +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @type {import('@graphql-codegen/cli').CodegenConfig} - */ -const config = { - schema: 'common/graphql/schema/*.graphql', - documents: ['common/graphql/documents/**/*.{ts,graphql}'], - ignoreNoDocuments: true, // for better experience with the watcher - config: { - enumsAsTypes: true, - maybeValue: 'T | null | undefined', - arrayInputCoercion: false, - strictScalars: true, - useTypeImports: true, - scalars: { - AWSDate: 'any', - AWSDateTime: 'any', - AWSEmail: 'any', - AWSIPAddress: 'any', - AWSJSON: 'any', - AWSPhone: 'any', - AWSTime: 'any', - AWSTimestamp: 'any', - AWSURL: 'any', - ID: 'string', - }, - }, - generates: { - // output combined graphql schema - 'common/graphql/generated/schema.graphql': { - config: { - // include AppSync directives in the generated schema - includeDirectives: true, - }, - plugins: ['schema-ast'], - }, - 'common/graphql/generated/': { - preset: 'client', - plugins: [], - presetConfig: { - gqlTagName: 'gql', - fragmentMasking: { unmaskFunctionName: 'getFragment' }, - useTypeImports: true, - documentMode: 'string', // reduce bundle size https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#documentmode - }, - }, - }, -}; - -module.exports = config; -// export default config diff --git a/graphql/codegen.ts b/graphql/codegen.ts index 12cc9a2..7c6f5d5 100644 --- a/graphql/codegen.ts +++ b/graphql/codegen.ts @@ -2,15 +2,15 @@ import type { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { overwrite: true, - schema: '../graphql/schema/*.graphql', - documents: '../graphql/documents/*.graphql', + schema: './graphql/schema/*.graphql', + documents: './graphql/documents/*.graphql', generates: { - 'src/generated/gql/': { + 'common/src/generated/graphql/': { preset: 'client', plugins: [], }, // output combined graphql schema - '../graphql/generated/schema.graphql': { + './graphql/generated/schema.graphql': { config: { // include AppSync directives in the generated schema includeDirectives: true, diff --git a/package.json b/package.json index 7a48a5f..0e0ab44 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "type": "module", "scripts": { + "postinstall": "pnpm generate:all", "dev": "pnpm dev:sst", "dev:sst": "sst dev", "dev:web": "pnpm run -C web dev", @@ -16,9 +17,8 @@ "db:reset": "pnpm -C backend dropcreatedb:docker", "db:generate": "pnpm run --filter backend generate", "generate:all": "pnpm exec concurrently -c green.bold,blue.bold pnpm:db:generate pnpm:generate-graphql-schema", - "generate-graphql-schema": "graphql-codegen-esm --config common/graphql/codegen-config.cjs", + "generate-graphql-schema": "graphql-codegen-esm --config graphql/codegen.ts", "generate": "pnpm generate:all", - "postinstall": "pnpm run generate", "test": "pnpm testall", "test:ci": "pnpm test", "testall": "pnpm tsc && pnpm test:backend && pnpm test:web", @@ -56,8 +56,8 @@ "@tsconfig/node20": "^1.0.0", "@types/aws-lambda": "^8.10.140", "@types/node": "^20.0.0", - "@typescript-eslint/eslint-plugin": "^7.14.1", - "@typescript-eslint/parser": "^7.14.1", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", "aws-cdk": "2.142.1", "aws-cdk-lib": "2.142.1", "concurrently": "^8.2.2", @@ -69,7 +69,7 @@ "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-import": "^2.27.5", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-react": "^7.30.0", "eslint-plugin-react-hooks": "^4.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6ce5ed..658b85f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,11 +52,11 @@ importers: specifier: ^20.0.0 version: 20.14.9 '@typescript-eslint/eslint-plugin': - specifier: ^7.14.1 - version: 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint@9.6.0)(typescript@5.5.2) + specifier: ^7.15.0 + version: 7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint@9.6.0)(typescript@5.5.2) '@typescript-eslint/parser': - specifier: ^7.14.1 - version: 7.14.1(eslint@9.6.0)(typescript@5.5.2) + specifier: ^7.15.0 + version: 7.15.0(eslint@9.6.0)(typescript@5.5.2) aws-cdk: specifier: 2.142.1 version: 2.142.1 @@ -83,16 +83,16 @@ importers: version: 9.6.0 eslint-config-airbnb: specifier: ^19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.6.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint-plugin-react@7.34.3(eslint@9.6.0))(eslint@9.6.0) + version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.6.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint-plugin-react@7.34.3(eslint@9.6.0))(eslint@9.6.0) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@9.6.0) eslint-import-resolver-typescript: specifier: ^3.5.3 - version: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) + version: 3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) + specifier: ^2.29.1 + version: 2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) eslint-plugin-jsx-a11y: specifier: ^6.5.1 version: 6.9.0(eslint@9.6.0) @@ -191,8 +191,8 @@ importers: version: 0.4.17 devDependencies: '@chax-at/transactional-prisma-testing': - specifier: ^0.5.0 - version: 0.5.0(@prisma/client@5.16.1(prisma@5.16.1)) + specifier: ^1.2.0 + version: 1.2.0(@prisma/client@5.16.1(prisma@5.16.1)) '@faker-js/faker': specifier: ^7.5.0 version: 7.6.0 @@ -1236,10 +1236,11 @@ packages: '@cdklabs/tskb@0.0.3': resolution: {integrity: sha512-JR+MuD4awAXvutu7HArephXfZm09GPTaSAQUqNcJB5+ZENRm4kV+L6vJL6Tn1xHjCcHksO+HAqj3gYtm5K94vA==} - '@chax-at/transactional-prisma-testing@0.5.0': - resolution: {integrity: sha512-pOhl8ZjbgLIjBe/zRoiArsV9Rzi5mhieESbRLXflHzParaeRHTcEhCcPyk6C/5IB7Hw6ye+V1wZuQzHh4jYyWQ==} + '@chax-at/transactional-prisma-testing@1.2.0': + resolution: {integrity: sha512-4GIEeHUlqcpggfz4t+t3tQb44uc67YWIzXnkB0m0Cy3jPOex/5fRhezebtqIxJzS2k4XIGxeJDij/Ajp0Mwy/Q==} + engines: {node: '>= 14'} peerDependencies: - '@prisma/client': ^2.29.0 || 3 || 4 + '@prisma/client': ^4.7.0 || 5 '@envelop/core@3.0.6': resolution: {integrity: sha512-06t1xCPXq6QFN7W1JUEf68aCwYN0OUDNAIoJe7bAqhaoa2vn7NCcuX1VHkJ/OWpmElUgCsRO6RiBbIru1in0Ig==} @@ -2633,8 +2634,8 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@typescript-eslint/eslint-plugin@7.14.1': - resolution: {integrity: sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==} + '@typescript-eslint/eslint-plugin@7.15.0': + resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -2644,8 +2645,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.14.1': - resolution: {integrity: sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==} + '@typescript-eslint/parser@7.15.0': + resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2664,16 +2665,16 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.14.1': - resolution: {integrity: sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==} + '@typescript-eslint/scope-manager@7.15.0': + resolution: {integrity: sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/scope-manager@7.2.0': resolution: {integrity: sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/type-utils@7.14.1': - resolution: {integrity: sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==} + '@typescript-eslint/type-utils@7.15.0': + resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2682,16 +2683,16 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.14.1': - resolution: {integrity: sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==} + '@typescript-eslint/types@7.15.0': + resolution: {integrity: sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/types@7.2.0': resolution: {integrity: sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/typescript-estree@7.14.1': - resolution: {integrity: sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==} + '@typescript-eslint/typescript-estree@7.15.0': + resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -2708,14 +2709,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.14.1': - resolution: {integrity: sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==} + '@typescript-eslint/utils@7.15.0': + resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.14.1': - resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==} + '@typescript-eslint/visitor-keys@7.15.0': + resolution: {integrity: sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/visitor-keys@7.2.0': @@ -8842,7 +8843,7 @@ snapshots: '@cdklabs/tskb@0.0.3': {} - '@chax-at/transactional-prisma-testing@0.5.0(@prisma/client@5.16.1(prisma@5.16.1))': + '@chax-at/transactional-prisma-testing@1.2.0(@prisma/client@5.16.1(prisma@5.16.1))': dependencies: '@prisma/client': 5.16.1(prisma@5.16.1) @@ -10573,14 +10574,14 @@ snapshots: dependencies: '@types/node': 20.14.9 - '@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint@9.6.0)(typescript@5.5.2)': + '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint@9.6.0)(typescript@5.5.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.5.2) - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/type-utils': 7.14.1(eslint@9.6.0)(typescript@5.5.2) - '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/type-utils': 7.15.0(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/visitor-keys': 7.15.0 eslint: 9.6.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -10591,12 +10592,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2)': + '@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.2) + '@typescript-eslint/visitor-keys': 7.15.0 debug: 4.3.5 eslint: 9.6.0 optionalDependencies: @@ -10617,20 +10618,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.14.1': + '@typescript-eslint/scope-manager@7.15.0': dependencies: - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 '@typescript-eslint/scope-manager@7.2.0': dependencies: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/visitor-keys': 7.2.0 - '@typescript-eslint/type-utils@7.14.1(eslint@9.6.0)(typescript@5.5.2)': + '@typescript-eslint/type-utils@7.15.0(eslint@9.6.0)(typescript@5.5.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) - '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.2) + '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.2) debug: 4.3.5 eslint: 9.6.0 ts-api-utils: 1.3.0(typescript@5.5.2) @@ -10639,14 +10640,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.14.1': {} + '@typescript-eslint/types@7.15.0': {} '@typescript-eslint/types@7.2.0': {} - '@typescript-eslint/typescript-estree@7.14.1(typescript@5.5.2)': + '@typescript-eslint/typescript-estree@7.15.0(typescript@5.5.2)': dependencies: - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 @@ -10673,20 +10674,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.14.1(eslint@9.6.0)(typescript@5.5.2)': + '@typescript-eslint/utils@7.15.0(eslint@9.6.0)(typescript@5.5.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.2) eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.14.1': + '@typescript-eslint/visitor-keys@7.15.0': dependencies: - '@typescript-eslint/types': 7.14.1 + '@typescript-eslint/types': 7.15.0 eslint-visitor-keys: 3.4.3 '@typescript-eslint/visitor-keys@7.2.0': @@ -12078,20 +12079,20 @@ snapshots: source-map: 0.6.1 optional: true - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint@9.6.0): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint@9.6.0): dependencies: confusing-browser-globals: 1.0.11 eslint: 9.6.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.6.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint-plugin-react@7.34.3(eslint@9.6.0))(eslint@9.6.0): + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.6.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint-plugin-react@7.34.3(eslint@9.6.0))(eslint@9.6.0): dependencies: eslint: 9.6.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint@9.6.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0))(eslint@9.6.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.6.0) eslint-plugin-react: 7.34.3(eslint@9.6.0) eslint-plugin-react-hooks: 4.6.2(eslint@9.6.0) @@ -12105,7 +12106,7 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.34.3(eslint@8.57.0) @@ -12128,13 +12129,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0): dependencies: debug: 4.3.5 enhanced-resolve: 5.17.0 eslint: 9.6.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.14.0 @@ -12145,12 +12146,12 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 4.3.5 enhanced-resolve: 5.17.0 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 @@ -12162,39 +12163,39 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.2) eslint: 9.6.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.2) eslint: 9.6.0 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.6.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -12204,7 +12205,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.6.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@9.6.0) hasown: 2.0.2 is-core-module: 2.14.0 is-glob: 4.0.3 @@ -12215,7 +12216,7 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.5.2) + '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -12231,7 +12232,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.6.0))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.14.0 is-glob: 4.0.3 diff --git a/sst.config.ts b/sst.config.ts index fc93dd5..dd62488 100644 --- a/sst.config.ts +++ b/sst.config.ts @@ -16,13 +16,13 @@ export default { config(input) { const stage = input.stage; - const region = (stage && REGION[stage]) || REGION.default; - const profile = (stage && PROFILE[stage]) || PROFILE.default; + const region = (stage && REGION[stage]) || REGION.default || process.env.AWS_DEFAULT_REGION; + const profile = (stage && PROFILE[stage]) || PROFILE.default || process.env.AWS_PROFILE; return { name: 'myapp', // replace me - region, - profile: process.env.CI ? undefined : profile, + ...(region && { region }), + ...(profile && !process.env.CI && { profile }), stage, }; }, diff --git a/stacks/index.ts b/stacks/index.ts index c91c8ad..305af74 100644 --- a/stacks/index.ts +++ b/stacks/index.ts @@ -41,7 +41,6 @@ export default function main(app: sst.App) { .stack(Dns) .stack(Layers) .stack(Database) - .stack(Secrets) .stack(BastionHost) // .stack(DatabaseMigrations) .stack(Auth) diff --git a/tsconfig.json b/tsconfig.json index 7d2142b..35d2f98 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,9 +10,9 @@ }, "extends": "./tsconfig.base.json", "include": [ - "stacks/**/*", - "backend/src/**/*", - "common/src/**/*", + "stacks/**/*.ts", + "backend/src/**/*.ts", + "common/src/**/*.ts", "index.d.ts", "vite.config.ts", "backend/src/index.d.ts" diff --git a/web/app/ui/TestGql.tsx b/web/app/ui/TestGql.tsx index 35c22df..6b2ed56 100644 --- a/web/app/ui/TestGql.tsx +++ b/web/app/ui/TestGql.tsx @@ -1,9 +1,12 @@ 'use client'; -import * as GQL from '../../../common/graphql/generated/gql'; +import { useMutation } from '@apollo/client'; +import { graphql } from '@common/generated/graphql'; + +const greetMutation = graphql(`mutation Greet($name: String!) {\n greet(name: $name) {\n greeting\n }\n}`); export const TestGql = () => { - const [greet] = GQL.useGreetMutation(); + const [greet] = useMutation(greetMutation); return (