Enable GraphQLUpload for Apollo Server 2.0 (#1322)

* export GraphQLUpload

* fix GraphQLScalar typing
This commit is contained in:
Prosper Otemuyiwa 2018-07-10 05:36:34 +01:00 committed by GitHub
parent 13b796fe34
commit 61b4939327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 11 deletions

View file

@ -34,3 +34,7 @@ export const gql: (
template: TemplateStringsArray | string,
...substitutions: any[]
) => DocumentNode = gqlTag;
import { GraphQLScalarType } from 'graphql';
import { GraphQLUpload as UploadScalar } from 'apollo-upload-server';
export const GraphQLUpload = UploadScalar as GraphQLScalarType;

View file

@ -1,6 +1,8 @@
export { GraphQLOptions, gql } from 'apollo-server-core';
export {
GraphQLUpload,
GraphQLOptions,
gql,
// Errors
ApolloError,
toApolloError,
SyntaxError,

View file

@ -1,6 +1,8 @@
export { GraphQLOptions, gql } from 'apollo-server-core';
export {
GraphQLUpload,
GraphQLOptions,
gql,
// Errors
ApolloError,
toApolloError,
SyntaxError,

View file

@ -1,6 +1,8 @@
export { GraphQLOptions, gql } from 'apollo-server-core';
export {
GraphQLUpload,
GraphQLOptions,
gql,
// Errors
ApolloError,
toApolloError,
SyntaxError,

View file

@ -1,6 +1,8 @@
export { GraphQLOptions, gql } from 'apollo-server-core';
export {
GraphQLUpload,
GraphQLOptions,
gql,
// Errors
ApolloError,
toApolloError,
SyntaxError,

View file

@ -1,4 +1,8 @@
export {
GraphQLUpload,
GraphQLOptions,
gql,
// Errors
ApolloError,
toApolloError,
SyntaxError,
@ -6,8 +10,6 @@ export {
AuthenticationError,
ForbiddenError,
UserInputError,
GraphQLOptions,
gql,
} from 'apollo-server-core';
export * from 'graphql-tools';

View file

@ -7,7 +7,12 @@ import * as http from 'http';
import * as net from 'net';
import { ApolloServer as ApolloServerBase } from 'apollo-server-express';
export { GraphQLOptions, GraphQLExtension, gql } from 'apollo-server-core';
export {
GraphQLUpload,
GraphQLOptions,
GraphQLExtension,
gql,
} from 'apollo-server-core';
export * from './exports';