Skip to content

Commit 8f82443

Browse files
committed
clean up
1 parent 567fcee commit 8f82443

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/__tests__.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
const Test = require('tape');
44
const graphql = require('graphql');
55
const gql = require('graphql-tag');
6-
const { SchemaDirectiveVisitor, MapperKind, mapSchema, getDirective} = require('@graphql-tools/utils');
6+
const { MapperKind, mapSchema, getDirective} = require('@graphql-tools/utils');
77
const GraphQLComponent = require('.');
8-
const {defaultFieldResolver} = require("graphql/index");
98

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

@@ -1113,7 +1112,8 @@ Test('federated schema can include custom directive', (t) => {
11131112
function customDirective(directiveName) {
11141113
return (schema) => mapSchema(schema, {
11151114
[MapperKind.OBJECT_FIELD]: (fieldConfig) => {
1116-
const directive = getDirective(schema, fieldConfig, directiveName)?.[0]
1115+
const directives = getDirective(schema, fieldConfig, directiveName)
1116+
const directive = directives && directives[0]
11171117
if (directive) {
11181118
return {
11191119
...fieldConfig,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"apollo-server": "^3.13.0",
4040
"casual": "^1.6.0",
4141
"eslint": "^6.5.1",
42-
"graphql": "^16.0.0",
42+
"graphql": "^16.8.1",
4343
"graphql-tag": "^2.12.4",
4444
"nyc": "^14.1.1",
4545
"sinon": "^12.0.1",

0 commit comments

Comments
 (0)