apollo-merge-types
v0.3.0
Published
Merge multiples types for apollo-server
Downloads
4
Readme
Apollo Merge Types
Merge multiples types for apollo-server
Install
npm install apollo-merge-types
or
yarn add apollo-merge-types
Usage
Javascript
const { ApolloServer } = require('apollo-server-express');
const apolloMergeTypes = require('apollo-merge-types');
const basePath = path.join(process.cwd(), '/src/types');
const server = new ApolloServer({
// ...
typeDefs: apolloMergeTypes(basePath)
// ...
});
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
});
Typescript
import { ApolloServer } from 'apollo-server-express';
import apolloMergeTypes from 'apollo-merge-types';
const basePath: string = path.join(process.cwd(), '/src/types');
const server = new ApolloServer({
// ...
typeDefs: apolloMergeTypes(basePath)
// ...
});
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
});
NPM Statistics
Download stats for this NPM package
License
Apollo Merge Types is open source software licensed as MIT.