Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bichikim committed Aug 14, 2023
1 parent c92f183 commit 8e58119
Show file tree
Hide file tree
Showing 19 changed files with 520 additions and 1,644 deletions.
7 changes: 0 additions & 7 deletions apps/key-stone/.gitignore

This file was deleted.

66 changes: 0 additions & 66 deletions apps/key-stone/auth.ts

This file was deleted.

29 changes: 0 additions & 29 deletions apps/key-stone/keystone.ts

This file was deleted.

25 changes: 0 additions & 25 deletions apps/key-stone/package.json

This file was deleted.

140 changes: 0 additions & 140 deletions apps/key-stone/schema.ts

This file was deleted.

10 changes: 0 additions & 10 deletions apps/key-stone/tsconfig.json

This file was deleted.

5 changes: 5 additions & 0 deletions apps/nuxt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Nuxt Full Stack Web Application

## server nitro x apollo-server x type-graphql x prisma

## client nuxt x apollo-client x tailwind
6 changes: 6 additions & 0 deletions apps/nuxt/RESEARCH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Research

한번 써보고 싶은 리스트

## 써볼꺼 Retake - Postgres용 하이브리드 검색 오픈소스
https://github.com/getretake/retake
12 changes: 12 additions & 0 deletions apps/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@ export default defineNuxtConfig({
],
'@nuxtjs/tailwindcss',
],
nitro: {
esbuild: {
options: {
target: 'esnext',
},
},
hooks: {
'rollup:before': (context) => {
context.options.moduleSideEffects.push('reflect-metadata')
},
},
},
})
17 changes: 12 additions & 5 deletions apps/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,40 @@
"generate": "nuxt generate",
"preview": "nuxt preview",
"prepare": "nuxt prepare",
"graphql:generate": "graphql-codegen",
"graphql:generate": "cross-env NODE_ENV=generate jiti ./server/schema.ts && graphql-codegen",
"prisma:generate": "prisma generate --schema=./server/schema.prisma",
"prisma:init": "prisma init --schema=./server/schema.prisma",
"prisma:migrate:dev": "prisma migrate dev --schema=./server/schema.prisma",
"docker:up": "docker-compose -f local-compose.yml up -d"
},
"dependencies": {
"nexus-prisma": "^1.0.17",
"@prisma/client": "^4.16.1",
"type-graphql": "^2.0.0-beta.2",
"@prisma/client": "^5.1.1",
"@apollo/server": "^4.7.5",
"graphql": "^16.7.1",
"graphql-scalars": "^1.22.2",
"graphql-fields": "^2.0.3",
"@as-integrations/h3": "^1.1.5",
"@byte-abc/lodash": "workspace:*",
"@vueuse/core": "^9.13.0",
"@quasar/extras": "^1.16.4",
"@byte-abc/use": "workspace:*",
"nexus": "^1.3.0"
"class-validator": "^0.14.0",
"reflect-metadata": "^0.1.13",
"tslib": "^2.6.1"
},
"devDependencies": {
"prisma": "^4.16.2",
"cross-env": "^7.0.3",
"prisma": "^5.1.1",
"@graphql-codegen/add": "^5.0.0",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/client-preset": "^4.1.0",
"@nuxtjs/apollo": "^5.0.0-alpha.6",
"@types/graphql-fields": "^1.3.5",
"nuxt-quasar-ui": "^2.0.2",
"typegraphql-prisma": "^0.27.0",
"@nuxt/devtools": "latest",
"@nuxtjs/tailwindcss": "^6.7.2",
"@types/node": "^18",
Expand Down
20 changes: 4 additions & 16 deletions apps/nuxt/server/api/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import 'reflect-metadata'
import {ApolloServer} from '@apollo/server'
import {startServerAndCreateH3Handler} from '@as-integrations/h3'
import {makeSchema} from 'nexus'
import {dirname, resolve} from 'node:path'
import {fileURLToPath} from 'node:url'
import * as resolvers from '../resolvers'
import {createSchema} from '../schema'

const __dirname = dirname(fileURLToPath(import.meta.url))
const schema = await createSchema()

const schema = makeSchema({
outputs: {
schema: resolve(__dirname, '../schema.graphql'),
typegen: resolve(__dirname, '../typings.ts'),
},
types: resolvers,
})

const apollo = new ApolloServer({schema})

export default startServerAndCreateH3Handler(apollo, {
export default startServerAndCreateH3Handler(new ApolloServer({schema}), {
// Optional: Specify context
context: ({event: {context}}) => {
return Promise.resolve({params: context.params, sessions: context.sessions})
Expand Down
9 changes: 9 additions & 0 deletions apps/nuxt/server/resolvers/HelloResolver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Query, Resolver} from 'type-graphql'

@Resolver()
export class HelloResolver {
@Query(() => String)
hello(): string {
return 'Hello World!'
}
}
Loading

0 comments on commit 8e58119

Please sign in to comment.