How do you omit fields? #1353
Replies: 3 comments 6 replies
-
I am considering using 2 models & making different resolvers |
Beta Was this translation helpful? Give feedback.
-
2 datasets means 2 object types. |
Beta Was this translation helpful? Give feedback.
-
Update: So I have tried multiple different techniques but there doesn't seem to be a nice way to implement this by default in the library. I could make a custom decorator that stores the values & then check it in the resolver function. Still thinking about this. Additionally, I can make it so for array the field is off limits but for individual queries we can allow it but the UserID must match the user getting the object |
Beta Was this translation helpful? Give feedback.
-
Let's say we have the following User model.
{ id: ID, email: string, username: string }
Then I want to define 2 queries:
I have been researching the documentation & cannot find how to accomplish this. I was thinking to grab the info for the fields manually & parse it per query but that seems like an oversight.
Beta Was this translation helpful? Give feedback.
All reactions