How to use apollo-server-cloudflare - 1 common examples

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 26 days ago

Package Health Score

62 / 100
Full package analysis

Popular apollo-server-cloudflare functions