Open oooplz opened 3 years ago
Using nexus-prisma generates code of name end of specified suffix, User、Post、UserWhereUniqueInput、PostWhereUniqueInput、UserWhereInput and PostWhereInput, for avoiding conflict of name of GraphQLObjectType.
This can be achieved with namespace importing
import * as NexusPrisma from 'nexus-prisma'
const User = objectType(NexusPrisma.User)
I am open to adding an internal namespace to make auto-import trivial.
I am open to what this namespace could be called, a good name here (other than NexusPrisma
) is unclear to me.
Providing inputObjectType and objectType Function be expose.
Please open an issue on Nexus about how to support this. I think it would be less confusing if the building blocks for this were made in core. Otherwise NP will have a similar but different API to N.
This can be achieved with namespace importing
import * as NexusPrisma from 'nexus-prisma' const User = objectType(NexusPrisma.User)
I am open to adding an internal namespace to make auto-import trivial.
I am open to what this namespace could be called, a good name here (other than
NexusPrisma
) is unclear to me.
Thanks very much for your replied.
Please open an issue on Nexus about how to support this. I think it would be less confusing if the building blocks for this were made in core. Otherwise NP will have a similar but different API to N.
It is so hard to articulate by text that we need time to tidy it -- explaining inputObjectType
and objectType
is how to be supported.
Thanks you again.
nexus-prisma
is awesome lib for me. I am hopingnexus-prisma
more popular, so some helpful suggestion be written in below:Using
nexus-prisma
generates code of name end of specified suffix,User_、Post_、UserWhereUniqueInput_、PostWhereUniqueInput_、UserWhereInput_ and PostWhereInput_
, for avoiding conflict of name ofGraphQLObjectType
.Providing
inputObjectType
andobjectType
Function be expose.Below code can implement
name
、description
、filterField
andexcludeField
features etc.How to use:
Generating below code:
Implementation of
isInputField
andinputObjectType
function