Skip to content

Commit 8b54967

Browse files
authored
Merge pull request #98 from ExpediaGroup/prune-update
Schema pruning update
2 parents 25e1d30 + 93a7959 commit 8b54967

5 files changed

Lines changed: 9 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v3.0.4
2+
3+
- Updated schema pruning dependency and TS definitions
14

25
### v3.0.3
36

lib/__tests__.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const Test = require('tape');
44
const gql = require('graphql-tag');
5-
const { SchemaDirectiveVisitor } = require('@graphql-tools/utils');
5+
const { SchemaDirectiveVisitor } = require('graphql-tools');
66
const graphql = require('graphql');
77
const GraphQLComponent = require('./index');
88

lib/index.d.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,11 @@ interface IContextWrapper extends ContextFunction {
2323
}
2424

2525
interface IGraphQLComponentOptions {
26-
types?: (string | Source | DocumentNode)[] | (string | Source | DocumentNode);
26+
types?: (string | Source | DocumentNode | GraphQLSchema)[] | (string | Source | DocumentNode | GraphQLSchema);
2727
resolvers?: IResolvers<any, any>;
2828
mocks?: boolean | MocksConfigFunction;
2929
directives?: DirectiveUseMap;
3030
federation?: boolean;
31-
makeExecutableSchema?: <TContext = any>({
32-
typeDefs,
33-
resolvers,
34-
resolverValidationOptions,
35-
parseOptions,
36-
inheritResolversFromInterfaces,
37-
pruningOptions,
38-
updateResolversInPlace,
39-
schemaExtensions
40-
}) => IExecutableSchemaDefinition<TContext>;
4131
imports?: GraphQLComponent[] | IGraphQLComponentConfigObject[];
4232
context?: IContextConfig;
4333
dataSources?: any[];

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const {
88
mergeTypeDefs,
99
addMocksToSchema,
1010
makeExecutableSchema,
11-
pruneSchema,
1211
SchemaDirectiveVisitor
1312
} = require('graphql-tools');
13+
const { pruneSchema } = require('@graphql-tools/utils');
1414

1515
const { bindResolvers } = require('./resolvers');
1616
const { wrapContext, createContext } = require('./context');

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-component",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Build, customize and compose GraphQL schemas in a componentized fashion",
55
"keywords": [
66
"graphql",
@@ -23,7 +23,8 @@
2323
"dependencies": {
2424
"@apollo/federation": "^0.28.0",
2525
"debug": "^4.3.1",
26-
"graphql-tools": "^7.0.5"
26+
"graphql-tools": "^7.0.5",
27+
"@graphql-tools/utils": "^8.6.10"
2728
},
2829
"peerDependencies": {
2930
"graphql": "^15.0.0"

0 commit comments

Comments
 (0)