graphql-engine/community/boilerplates/remote-schemas/azure-functions/nodejs/graphql/run.js
Tirumarai Selvan d6a3cf337f add hello-world remote-schema boilerplates for major serverless providers (#1694)
A hello world schema is provided with local dev and deployment instructions for AWS Lambda, Google Cloud Functions and Azure Functions.

Older boilerplates are cleaned up.
2019-03-05 21:45:39 +05:30

17 lines
355 B
JavaScript

const { ApolloServer } = require("apollo-server-azure-functions");
const { typeDefs, resolvers } = require('./server');
const server = new ApolloServer({
typeDefs,
resolvers,
});
module.exports = server.createHandler({
cors: {
origin: '*',
credentials: true,
allowedHeaders: 'Content-Type, Authorization'
},
});