Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPRAB-3842: use newer graphql-tools dependency #99

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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