Skip to content

jliocsar/wendigo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧣 wendigo

Hono Apollo GraphQL Prisma PostgreSQL Zod

This repository is a boilerplate for:

File Structure

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

Hono + GraphQL Integration

  • lib/hono-apollo-graphql exports the apollo() helper to bootstrap a Hono app, which then serves a Apollo Server under the "/graphql" path.
  • The apollo() helper receives a root key, which is an import() call to any folder that has an index.ts exporting:
    • server -- The instance of the new ApolloServer(...);
    • context -- The context function for the Apollo server (i.e. the ContextThunk).
  • You can also provide your own Hono app on the apollo() call.
    • The default app already uses the following middlewares:
      • cors()

Database

WIP

Validations

WIP

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published