Skip to content

Commit 166acfc

Browse files
vespaiachconfuser
andauthored
fix: remove unsupported paramter "schemaTransforms" (#72)
Co-authored-by: James Mortemore <[email protected]>
1 parent fcb7af0 commit 166acfc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ const typeDefs = `
3030
input BookInput {
3131
title: String! @constraint(minLength: 5, format: "email")
3232
}`
33-
const schema = makeExecutableSchema({
33+
34+
let schema = makeExecutableSchema({
3435
typeDefs: [constraintDirectiveTypeDefs, typeDefs],
35-
schemaTransforms: [constraintDirective()]
3636
})
37+
schema = constraintDirective()(schema)
38+
3739
const app = express()
3840
const server = new ApolloServer({ schema })
3941

test/setup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const request = require('supertest')
55
const { constraintDirective, constraintDirectiveTypeDefs } = require('../')
66

77
module.exports = function (typeDefs, formatError, resolvers) {
8-
const schema = makeExecutableSchema({
8+
let schema = makeExecutableSchema({
99
typeDefs: [ constraintDirectiveTypeDefs, typeDefs ],
10-
schemaTransforms: [constraintDirective()],
1110
resolvers
1211
})
12+
schema = constraintDirective()(schema)
13+
1314
const app = express()
1415
const server = new ApolloServer({ schema, formatError })
1516

0 commit comments

Comments
 (0)