-
Notifications
You must be signed in to change notification settings - Fork 2k
/
index.ts
47 lines (39 loc) 路 1.25 KB
/
index.ts
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
import 'apollo-server-env';
export { runQuery } from './runQuery';
export { runHttpQuery, HttpQueryRequest, HttpQueryError } from './runHttpQuery';
export {
default as GraphQLOptions,
resolveGraphqlOptions,
PersistedQueryOptions,
} from './graphqlOptions';
export {
ApolloError,
toApolloError,
SyntaxError,
ValidationError,
AuthenticationError,
ForbiddenError,
UserInputError,
formatApolloErrors,
} from 'apollo-server-errors';
export { convertNodeHttpToRequest } from './nodeHttpToRequest';
export {
createPlaygroundOptions,
PlaygroundConfig,
defaultPlaygroundOptions,
PlaygroundRenderPageOptions,
} from './playground';
// ApolloServer Base class
export { ApolloServerBase } from './ApolloServer';
export * from './types';
// This currently provides the ability to have syntax highlighting as well as
// consistency between client and server gql tags
import { DocumentNode } from 'graphql';
import gqlTag from 'graphql-tag';
export const gql: (
template: TemplateStringsArray | string,
...substitutions: any[]
) => DocumentNode = gqlTag;
import { GraphQLScalarType } from 'graphql';
import { GraphQLUpload as UploadScalar } from '@apollographql/apollo-upload-server';
export const GraphQLUpload = UploadScalar as GraphQLScalarType;