rooneyK
10/31/2018, 6:40 PM# database-generated input
input TagCreateInput {
name: String
description: String
type: TagTypes
createdBy: UserCreateOneWithoutCreatedTagsInput!
}
input TagCreateInput {
name: String
description: String
type: TagTypes
}
Now, in this example, the bottom one (publicly exposes) is what the user can see and interact with. Note that we have simply compied that whole Tag from the database and removed createdBy. This does work, but the maintenance-level is high for this solution, especially as tables evovle with more and more relations, nesting etc. There are so many ways that a Tag might be created. I am wondering, is it possible, to instead of copying the whole input-object and removing the fields we don't want publicly available, would it be possible to instead something like extending input with removal of some specific fields? Or is there a different solution available?Mike
10/31/2018, 8:09 PMnull. We do that for some permissioning things where it either returns the actual field or null if you don’t have permissions.Mike
10/31/2018, 8:10 PM0 or "" or something else matching the expected type where it’s clear that it’s just “bad data” and the client is expected to interpret that as “dont query this field”rooneyK
10/31/2018, 8:32 PM