Version: legacy

Implement Your Server

To get started, add express and express-graphql to your app:

yarn add express express-graphql

Then,

import { GraphQLModule } from '@graphql-modules/core';
import * as express from 'express';
import * as graphqlHTTP from 'express-graphql';
const { schema } = new GraphQLModule({
/*...*/
});
const app = express();
app.use(
'/graphql',
graphqlHTTP({
schema,
graphiql: true,
})
);
app.listen(4000);

To test your server, run ts-node index.ts and try to open http://localhost:4000/. See the GraphiQL UI.

If you want to use Apollo-Server, check the Integrate with Apollo Server section.