How to use the apollo-server-cloudflare.ApolloServer function in apollo-server-cloudflare

To help you get started, we’ve selected a few apollo-server-cloudflare 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 jbaxleyiii / apollo-server-cloudflare / index.js View on Github external
const { ApolloServer } = require("apollo-server-cloudflare");
const gql = String.raw;

const server = new ApolloServer({
  typeDefs: gql`
    type Query {
      hello: String!
    }
  `,
  resolvers: {
    Query: {
      hello: () => "world",
    },
  },
});

server.listen().then(({ url }) => console.log(`Server ready!`));

apollo-server-cloudflare

Production-ready Node.js GraphQL server for Cloudflare workers

MIT
Latest version published 5 months ago

Package Health Score

83 / 100
Full package analysis

Popular apollo-server-cloudflare functions