How to use the apollo-server-hapi.makeExecutableSchema function in apollo-server-hapi

To help you get started, we’ve selected a few apollo-server-hapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github itsezc / CycloneIO / packages / server / source / network / api / APIServer.ts View on Github external
export const createAPIServer = async (config: CycloneConfig): Promise => {
    const api = new Hapi.Server(
        {
            //This should be in the config
            port: 8087
        }
    )

    const schema = makeExecutableSchema(
        {
            typeDefs,
            resolvers,
            resolverValidationOptions: {
                requireResolversForResolveType: false
            }
        }
    )

    const apolloServer = new ApolloServer(
        {
            schema,
            context: {
                db: prisma
            }
        }

apollo-server-hapi

Production-ready Node.js GraphQL server for Hapi

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis