Apollo Server integration for native Node.js HTTP
This integration of Apollo Server works with native Node.js HTTP.
Installation
Install package with yarn or npm:
yarn add apollo-server-native graphql
npm install apollo-server-native graphql
Example with HTTP
const http = const ApolloServer gql = const typeDefs = gql` type Query { hello: String }` const resolvers = Query: 'Hello world!' const apolloServer = typeDefs resolvers const server = http server server
Example with HTTPS
const https = const ApolloServer gql = const typeDefs = gql` type Query { hello: String }` const resolvers = Query: 'Hello world!' const apolloServer = typeDefs resolvers const server = https server server