forked from moleculerjs/moleculer-apollo-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
53 lines (45 loc) · 1.26 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* moleculer-apollo-server
*
* Apollo Server for Moleculer API Gateway.
*
* Based on "apollo-server-micro"
*
* https://github.com/apollographql/apollo-server/blob/master/packages/apollo-server-micro/
*
*
* Copyright (c) 2020 MoleculerJS (https://github.com/moleculerjs/moleculer-apollo-server)
* MIT Licensed
*/
"use strict";
const { GraphQLError } = require("graphql");
// const GraphQLUpload = require("graphql-upload");
const { ApolloServer } = require("./src/ApolloServer");
const ApolloService = require("./src/service");
const gql = require("./src/gql");
module.exports = {
// Only GraphQLError exposes, other errors need custom creation
GraphQLError,
// Core
// Next defs are removed in v4 from core
/*
GraphQLExtension: core.GraphQLExtension,
gql: core.gql,
ApolloError: core.ApolloError,
toApolloError: core.toApolloError,
SyntaxError: core.SyntaxError,
ValidationError: core.ValidationError,
AuthenticationError: core.AuthenticationError,
ForbiddenError: core.ForbiddenError,
UserInputError: core.UserInputError,
defaultPlaygroundOptions: core.defaultPlaygroundOptions,
*/
// GraphQL Upload
// GraphQLUpload,
// Apollo Server
ApolloServer,
// Apollo Moleculer Service
ApolloService,
// Moleculer gql formatter
moleculerGql: gql,
};