Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose ApolloServerOptions interfaces #7311

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fluffy-rats-fail.md
@@ -0,0 +1,5 @@
---
'@apollo/server': patch
---

Export intermediate ApolloServerOptions\* types
6 changes: 3 additions & 3 deletions packages/server/src/externalTypes/constructor.ts
Expand Up @@ -106,23 +106,23 @@ interface ApolloServerOptionsBase<TContext extends BaseContext> {
__testing_incrementalExecutionResults?: GraphQLExperimentalIncrementalExecutionResults;
}

interface ApolloServerOptionsWithGateway<TContext extends BaseContext>
export interface ApolloServerOptionsWithGateway<TContext extends BaseContext>
extends ApolloServerOptionsBase<TContext> {
gateway: GatewayInterface;
schema?: undefined;
typeDefs?: undefined;
resolvers?: undefined;
}

interface ApolloServerOptionsWithSchema<TContext extends BaseContext>
export interface ApolloServerOptionsWithSchema<TContext extends BaseContext>
extends ApolloServerOptionsBase<TContext> {
schema: GraphQLSchema;
gateway?: undefined;
typeDefs?: undefined;
resolvers?: undefined;
}

interface ApolloServerOptionsWithTypeDefs<TContext extends BaseContext>
export interface ApolloServerOptionsWithTypeDefs<TContext extends BaseContext>
extends ApolloServerOptionsBase<TContext> {
// These two options are always only passed directly through to
// makeExecutableSchema. (If you don't want to use makeExecutableSchema, pass
Expand Down
4 changes: 4 additions & 0 deletions packages/server/src/externalTypes/index.ts
Expand Up @@ -43,6 +43,10 @@ export type {
ApolloConfig,
PersistedQueryOptions,
CSRFPreventionOptions,
ApolloServerOptionsWithSchema,
ApolloServerOptionsWithTypeDefs,
ApolloServerOptionsWithStaticSchema,
ApolloServerOptionsWithGateway,
ApolloServerOptions,
} from './constructor.js';

Expand Down