This repository is a boilerplate for:
lib/
├── hono-apollo-graphql
├── prisma-client
├── wendigo-graphql
└── types
src/
├── index.ts
├── generate-schema.ts
├── logger.ts
├── setup.ts
├── apollo/
│ ├── index.ts
│ ├── context.ts
│ ├── server.ts
│ ├── schema.ts
│ └── generated/
│ ├── nexus-types.gen.ts
│ └── schema.gen.graphql
├── db/
│ ├── client.ts
│ └── generated/
│ └── types.ts
└── modules/
└── {module_name}/
├── {module_name}-service.ts
├── {module_name}-types.ts
└── graphql/
├── index.ts
├── {module_name}-query.ts
├── {module_name}-mutation.ts
└── {module_name}-type.ts
lib/hono-apollo-graphql
exports theapollo()
helper to bootstrap a Hono app, which then serves a Apollo Server under the"/graphql"
path.- The
apollo()
helper receives aroot
key, which is animport()
call to any folder that has anindex.ts
exporting:server
-- The instance of thenew ApolloServer(...)
;context
-- The context function for the Apollo server (i.e. theContextThunk
).
- You can also provide your own Hono app on the
apollo()
call.- The default app already uses the following middlewares:
cors()
- The default app already uses the following middlewares:
WIP
WIP