This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MongoDBConfig } from './Config' | |
import * as mongoose from 'mongoose' | |
import * as bluebird from 'bluebird' | |
import { logger } from './Logger' | |
export enum ConnectionStatus { | |
DISCONNECTED = 'DISCONNECTED', | |
CONNECTED = 'CONNECTED', | |
ERROR = 'ERROR', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
... | |
module: { | |
... | |
rules: [ | |
... | |
{ | |
test: /\.graphql$/, | |
exclude: /node_modules/, | |
loader: 'graphql-tag/loader', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
... | |
"typeRoots": ["node_modules/@types", "src/@types"], | |
}, | |
"files": ["src/@types/graphql.d.ts"], | |
"include": ["src/**/*"], | |
"exclude": ["node_modules", "**/*.spec.ts"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloServer } from 'apollo-server' | |
import { resolvers } from './graphql/resolvers' | |
import typeDefs from './graphql/Query.graphql' | |
const server = new ApolloServer({ | |
typeDefs, | |
resolvers, | |
}) | |
server.listen().then(({ url }) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.graphql' { | |
import { DocumentNode } from 'graphql' | |
const Schema: DocumentNode | |
export = Schema | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.graphql' { | |
import { DocumentNode } from 'graphql'; | |
const MyQuery: DocumentNode; | |
export { MyQuery }; | |
export default MyQuery; | |
} |