Fix bug with id middleware

Ids are queried only for well known queries and mutations
This commit is contained in:
Robert Schäfer 2019-02-22 16:11:07 +01:00
parent 889818cd2d
commit 2e7e0579e4
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,3 @@
// import { neo4jgraphql } from "neo4j-graphql-js"
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import bcrypt from 'bcryptjs' import bcrypt from 'bcryptjs'

View File

@ -15,10 +15,14 @@ const includeId = async (resolve, root, args, context, resolveInfo) => {
} }
export default { export default {
Query: (resolve, root, args, context, info) => { Query: {
User: (resolve, root, args, context, info) => {
return includeId(resolve, root, args, context, info) return includeId(resolve, root, args, context, info)
}
}, },
Mutation: (resolve, root, args, context, info) => { Mutation: {
CreatePost: (resolve, root, args, context, info) => {
return includeId(resolve, root, args, context, info) return includeId(resolve, root, args, context, info)
} }
} }
}