Open shoaibsharif opened 4 years ago
Hi, @shoaibsharif. Did you find a proper solution to this? I've come across a few people now – myself included – who's seen this issue. As you mentioned, the only way other than manually writing input types for everything is to expose the related crud operation and then that seems to work in generating the required types.
I couldn’t find any solution after that. Please let me know to if you can find any.
I get my enums with this:
import { enumType } from '@nexus/schema';
import * as photon from '../generated/photon/photonC';
export const Gender = enumType({
name: 'Gender',
members: photon.Gender,
});
I did not renamed photon to prisma but it is working with latest beta version. Most of my inputTypes are rewritten not only due to this behavior, often I don`t wanted to expose all fields.
here is my schema on
schema.prisma
when I try to create Mutation I tried to do this:
when I run the server, I get this error
But I tried to use
t.crud.createOneOffer()
or anything witht.crud.
(which was not in nexus documentation I want to mention that), it solves the problem. So Is there any workaround with this?I am using: