Skip to content

Commit

Permalink
fix: updated apollo server 4 typescript d files to match javascript (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
koivumi79 authored Oct 27, 2023
1 parent ca75884 commit 286a9ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apollo4.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DocumentNode, GraphQLSchema} from "graphql";
import {DocumentNode} from "graphql";
import {ApolloServerPlugin} from '@apollo/server';

/**
Expand All @@ -14,6 +14,6 @@ export const constraintDirectiveTypeDefsGql: DocumentNode;
/**
* Create Apollo 4 validation plugin.
*
* @param options to setup plugin. `schema` is deprecated now, not used, as plugins gets schema from the Apollo Server.
* @param options to setup plugin.
*/
export function createApollo4QueryValidationPlugin ( options: { schema?: GraphQLSchema } ) : ApolloServerPlugin;
export function createApollo4QueryValidationPlugin ( options?: {} ) : ApolloServerPlugin;
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const constraintDirectiveTypeDefs: string
* @param variables used in the query to validate
* @param operationName optional name of the GraphQL operation to validate
*/
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string) => Array<GraphQLError>;
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string, pluginOptions?: {}) => Array<GraphQLError>;

/**
* Create Apollo 3 plugin performing query validation.
Expand Down

0 comments on commit 286a9ef

Please sign in to comment.