forked from apollographql/federation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update typescript exports for schema extensions (apollographql#2118)
* Update typescript exports for schema extensions Co-authored-by: Chris Lenfest <clenfest@apollographql.com>
- Loading branch information
Showing
6 changed files
with
48 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,11 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
|
||
type GraphQLReferenceResolver<TContext> = ( | ||
reference: object, | ||
context: TContext, | ||
info: GraphQLResolveInfo, | ||
) => any; | ||
|
||
interface ApolloSubgraphExtensions<TContext> { | ||
resolveReference?: GraphQLReferenceResolver<TContext>; | ||
} | ||
import { GraphQLSchemaExtensions } from 'graphql'; | ||
|
||
interface ApolloGatewayExtensions { | ||
version?: String; | ||
} | ||
|
||
declare module 'graphql/type/definition' { | ||
interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> { | ||
apollo?: { | ||
subgraph?: ApolloSubgraphExtensions<_TContext>; | ||
} | ||
} | ||
|
||
interface GraphQLInterfaceTypeExtensions<_TSource = any, _TContext = any> { | ||
apollo?: { | ||
subgraph?: ApolloSubgraphExtensions<_TContext>; | ||
} | ||
} | ||
|
||
interface GraphQLUnionTypeExtensions<_TSource = any, _TContext = any> { | ||
apollo?: { | ||
subgraph?: ApolloSubgraphExtensions<_TContext>; | ||
} | ||
} | ||
} | ||
|
||
declare module 'graphql/type/schema' { | ||
interface GraphQLSchemaExtensions { | ||
apollo?: { | ||
gateway?: ApolloGatewayExtensions; | ||
} | ||
export interface ApolloGraphQLSchemaExtensions extends GraphQLSchemaExtensions { | ||
apollo?: { | ||
gateway?: ApolloGatewayExtensions; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters