Skip to content

Commit

Permalink
builds
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Jul 2, 2024
1 parent fc90b27 commit 22535e8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
24 changes: 12 additions & 12 deletions backend/src/api/resolver/greeting.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { defaultAppSyncMiddleware } from '@backend/middleware/lambda';
import { logger } from '@backend/util/logger';
import { incrementMetric } from '@backend/util/metrics';
import { AppSyncResolverEvent } from 'aws-lambda';
import { GreetingResponse, GreetingState, MutationGreetArgs } from 'common/generated/graphql/graphql';
import { defaultAppSyncMiddleware } from '@backend/middleware/lambda'
import { logger } from '@backend/util/logger'
import { incrementMetric } from '@backend/util/metrics'
import { AppSyncResolverEvent } from 'aws-lambda'
import { GreetingResponse, GreetingState, MutationGreetArgs } from '@common/generated/graphql/graphql'

export const GREETING = 'Yo yo';
export const GREETING = 'Yo yo'

// sample query
export const getGreeting = (): GreetingState => ({
currentGreeting: GREETING,
});
})

// sample mutation
export const greetInner = async ({
arguments: { name },
}: AppSyncResolverEvent<MutationGreetArgs>): Promise<GreetingResponse> => {
incrementMetric('SaidHello');
logger.debug('Saying greeting to', { name });
incrementMetric('SaidHello')
logger.debug('Saying greeting to', { name })

return {
greeting: `${GREETING}, ${name}!`,
};
};
export const greet = defaultAppSyncMiddleware()(greetInner);
}
}
export const greet = defaultAppSyncMiddleware()(greetInner)
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"postinstall": "pnpm generate:all",
"dev": "pnpm dev:sst",
"dev:sst": "sst dev",
"dev:web": "pnpm run -C web dev",
"dev:web": "pnpm run --filter web dev",
"watch": "pnpm run tsc:watch",
"tsc": "tsc",
"tsc:watch": "tsc --watch",
Expand All @@ -23,11 +23,13 @@
"test:ci": "pnpm test",
"testall": "pnpm tsc && pnpm test:backend && pnpm test:web",
"test:backend": "pnpm db:start && pnpm generate && pnpm run -C backend migrate:test && vitest run",
"test:web": "pnpm run -C web test",
"lint": "pnpm run --recursive --aggregate-output lint && pnpm lint:toplevel",
"lint:toplevel": "eslint --ext .js,.ts,.tsx stacks",
"lint:fix": "pnpm run lint -- --fix",
"build:web": "pnpm run -C web build",
"test:web": "pnpm run --filter web test",
"lint": "eslint --ext .ts,.tsx .",
"lint:fix": "pnpm run lint --fix",
"lint:errors": "eslint --fix --ext .ts,.tsx --quiet .",
"lint:staged": "eslint --fix",
"ci:lint": "pnpm lint:errors",
"build:web": "pnpm run --filter web build",
"build": "pnpm tsc",
"deploy": "pnpm generate && sst deploy",
"remove": "sst remove",
Expand Down

0 comments on commit 22535e8

Please sign in to comment.