Skip to content

Commit 286a9ef

Browse files
authored
fix: updated apollo server 4 typescript d files to match javascript (#209)
1 parent ca75884 commit 286a9ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apollo4.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {DocumentNode, GraphQLSchema} from "graphql";
1+
import {DocumentNode} from "graphql";
22
import {ApolloServerPlugin} from '@apollo/server';
33

44
/**
@@ -14,6 +14,6 @@ export const constraintDirectiveTypeDefsGql: DocumentNode;
1414
/**
1515
* Create Apollo 4 validation plugin.
1616
*
17-
* @param options to setup plugin. `schema` is deprecated now, not used, as plugins gets schema from the Apollo Server.
17+
* @param options to setup plugin.
1818
*/
19-
export function createApollo4QueryValidationPlugin ( options: { schema?: GraphQLSchema } ) : ApolloServerPlugin;
19+
export function createApollo4QueryValidationPlugin ( options?: {} ) : ApolloServerPlugin;

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const constraintDirectiveTypeDefs: string
6464
* @param variables used in the query to validate
6565
* @param operationName optional name of the GraphQL operation to validate
6666
*/
67-
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string) => Array<GraphQLError>;
67+
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string, pluginOptions?: {}) => Array<GraphQLError>;
6868

6969
/**
7070
* Create Apollo 3 plugin performing query validation.

0 commit comments

Comments
 (0)