nexus-plugin-prisma
nexus-plugin-prisma copied to clipboard
inputObjectTypes exposed all fields
I like the approach to white listen fields in ObjectTypes, why do InputObjectTypes includes all fields? For now I have to rewrite all InputTypes:
import {inputObjectType} from "nexus";
export const UserUpdateInput = inputObjectType({
name: "UserUpdateInput",
definition(t){
t.string('email', {required: false})
}
})
It would be very nice to have something like this:
import {inputObjectType} from "nexus";
export const UserUpdateInput = inputObjectType({
name: "UserUpdateInput",
definition(t){
t.model('User').email()
}
})
@mazzaker is there a workaround ? This is what prevents us from migrating to prisma 2...
@durdenx We rewrite all inputTypes, using only nexus without nexus-prisma-plugin. I changed the generator from https://github.com/paljs/prisma-tools to our needs (folder structure, one file per Input).