Skip to content

Commit

Permalink
Updated pruning to latest. Removed unused options in TS defs. Updated…
Browse files Browse the repository at this point in the history
… typeDefs types supported to include GraphQLSchema.
  • Loading branch information
tlivings authored May 18, 2022
1 parent 25e1d30 commit 34de7af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/__tests__.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const Test = require('tape');
const gql = require('graphql-tag');
const { SchemaDirectiveVisitor } = require('@graphql-tools/utils');
const { SchemaDirectiveVisitor } = require('graphql-tools');
const graphql = require('graphql');
const GraphQLComponent = require('./index');

Expand Down
12 changes: 1 addition & 11 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,11 @@ interface IContextWrapper extends ContextFunction {
}

interface IGraphQLComponentOptions {
types?: (string | Source | DocumentNode)[] | (string | Source | DocumentNode);
types?: (string | Source | DocumentNode | GraphQLSchema)[] | (string | Source | DocumentNode | GraphQLSchema);
resolvers?: IResolvers<any, any>;
mocks?: boolean | MocksConfigFunction;
directives?: DirectiveUseMap;
federation?: boolean;
makeExecutableSchema?: <TContext = any>({
typeDefs,
resolvers,
resolverValidationOptions,
parseOptions,
inheritResolversFromInterfaces,
pruningOptions,
updateResolversInPlace,
schemaExtensions
}) => IExecutableSchemaDefinition<TContext>;
imports?: GraphQLComponent[] | IGraphQLComponentConfigObject[];
context?: IContextConfig;
dataSources?: any[];
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const {
mergeTypeDefs,
addMocksToSchema,
makeExecutableSchema,
pruneSchema,
SchemaDirectiveVisitor
} = require('graphql-tools');
const { pruneSchema } = require('@graphql-tools/utils');

const { bindResolvers } = require('./resolvers');
const { wrapContext, createContext } = require('./context');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"dependencies": {
"@apollo/federation": "^0.28.0",
"debug": "^4.3.1",
"graphql-tools": "^7.0.5"
"graphql-tools": "^7.0.5",
"@graphql-tools/utils": "^8.6.10"
},
"peerDependencies": {
"graphql": "^15.0.0"
Expand Down

0 comments on commit 34de7af

Please sign in to comment.