Skip to content

Commit

Permalink
Don't export middleware from packages
Browse files Browse the repository at this point in the history
We are going to tweak registerServer until there is no reason to prefer a
non-ApolloServer-associated middleware function over using it.
  • Loading branch information
glasser committed Jun 13, 2018
1 parent 5e59605 commit 2ff159d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
1 change: 0 additions & 1 deletion packages/apollo-server-cloudflare/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { graphqlCloudflare } from './cloudflareApollo';
export { ApolloServer } from './ApolloServer';
export { gql } from 'apollo-server-core';
10 changes: 0 additions & 10 deletions packages/apollo-server-express/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ export {
ForbiddenError,
} from 'apollo-server-core';

// Express Middleware
export {
ExpressGraphQLOptionsFunction,
ExpressHandler,
graphqlExpress,
} from './expressApollo';

// Connect Middleware
export { graphqlConnect } from './connectApollo';

// ApolloServer integration
export {
ApolloServer,
Expand Down
8 changes: 0 additions & 8 deletions packages/apollo-server-hapi/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ export interface ServerRegistration {
uploads?: boolean | Record<string, any>;
}

export interface HapiListenOptions {
port?: number | string;
host?: string; // default: ''
pipePath?: string;
graphqlPaths?: string[]; // default: ['/graphql']
innerHost?: string; // default: '127.0.0.1'. This is where Node listens.
}

const handleFileUploads = (uploadsConfig: Record<string, any>) => async (
request: hapi.Request,
) => {
Expand Down
13 changes: 5 additions & 8 deletions packages/apollo-server-hapi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ export {
ForbiddenError,
} from 'apollo-server-core';

export {
IRegister,
HapiOptionsFunction,
HapiPluginOptions,
graphqlHapi,
} from './hapiApollo';

// ApolloServer integration
export { ApolloServer, registerServer } from './ApolloServer';
export {
ApolloServer,
registerServer,
ServerRegistration,
} from './ApolloServer';

0 comments on commit 2ff159d

Please sign in to comment.