Skip to content

Commit

Permalink
Merge pull request #99 from logovaser/VPRAB-3842_use_newer_graphql-to…
Browse files Browse the repository at this point in the history
…ols_dependency

VPRAB-3842: use newer graphql-tools dependency
  • Loading branch information
tlivings committed Aug 16, 2022
2 parents 8b54967 + 88df0cf commit 1f5233b
Show file tree
Hide file tree
Showing 8 changed files with 5,573 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v3.1.0

- Updated graphql-tools dependency to fix security vulnerabilities

### v3.0.4

- Updated schema pruning dependency and TS definitions
Expand Down
6 changes: 3 additions & 3 deletions lib/__tests__.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

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

Test('GraphQLComponent instance API (getters/setters)', (t) => {

Expand Down
6 changes: 5 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { DocumentNode, GraphQLSchema, Source } from 'graphql';
import { DirectiveUseMap, IDelegateToSchemaOptions, IExecutableSchemaDefinition, IResolvers, IMocks, PruneSchemaOptions } from 'graphql-tools'
import { IDelegateToSchemaOptions } from '@graphql-tools/delegate';
import { IResolvers, PruneSchemaOptions } from '@graphql-tools/utils';
import { IMocks } from '@graphql-tools/mock';

type DirectiveUseMap = { [key: string]: any };

interface IGraphQLComponentConfigObject {
component: GraphQLComponent;
Expand Down
18 changes: 7 additions & 11 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
'use strict';

const { buildFederatedSchema } = require('@apollo/federation');

const {
stitchSchemas,
delegateToSchema,
mergeTypeDefs,
addMocksToSchema,
makeExecutableSchema,
SchemaDirectiveVisitor
} = require('graphql-tools');
const { pruneSchema } = require('@graphql-tools/utils');
const { stitchSchemas } = require('@graphql-tools/stitch');
const { mergeTypeDefs } = require('@graphql-tools/merge');
const { addMocksToSchema } = require('@graphql-tools/mock');
const { makeExecutableSchema } = require('@graphql-tools/schema');
const { delegateToSchema } = require('@graphql-tools/delegate');
const { pruneSchema, SchemaDirectiveVisitor } = require('@graphql-tools/utils');

const { bindResolvers } = require('./resolvers');
const { wrapContext, createContext } = require('./context');
Expand Down Expand Up @@ -79,7 +75,7 @@ class GraphQLComponent {

this._dataSourceInjection = createDataSourceInjection(this, dataSourceOverrides);

this.graphqlTools = require('graphql-tools');
this.graphqlTools = require('@graphql-tools/schema');
}

get name() {
Expand Down
2 changes: 1 addition & 1 deletion lib/transforms/__tests__.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { exclusions } = require('./index.js');
const Test = require('tape');
const { FilterTypes, FilterObjectFields } = require('graphql-tools');
const { FilterTypes, FilterObjectFields } = require('@graphql-tools/wrap');

Test('exclusions() accepts null exclude arg', (t) => {
t.plan(1);
Expand Down
2 changes: 1 addition & 1 deletion lib/transforms/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { FilterTypes, FilterObjectFields } = require('graphql-tools');
const { FilterTypes, FilterObjectFields } = require('@graphql-tools/wrap');

const exclusions = function(exclusions = []) {
return exclusions.map((exclusion) => {
Expand Down
Loading

0 comments on commit 1f5233b

Please sign in to comment.