Hi. I have two question about the code below. 1. ...
# orm-help
y
Hi. I have two question about the code below. 1. why nexus makes 2(NexusGenObjects, NexusGenFieldTypes) different interface ?. I cant’t find it in the nexus official document. 2. what does “field return type” means in NexusGenFieldTypes ? 🤔 I think it’s because of the characteristics of graphql, but I don’t know the exact reason. thank you !!
h
IMO, 1.
NexusGenObjects
represents pure object type that are mostly similar to database.
NesxusGenFieldTypes
covers extended
fields
that could be done by the concept of
graphQL field resolver
. 2. Similar to what I've explained earlier. The
field return type
looks like all possible return fields that are defined in nexus objectType. FYI, here is how field resolver can handle extra fields. https://github.com/dooboolab/hackatalk/blob/92814f395c39c77e3cc1cc57400602aa80860cc5/server/src/models/Channel.ts#L9-L32
j
Maybe better question for #graphql-nexus