wenye
03/09/2022, 4:54 PMdevoxel
03/09/2022, 5:31 PMJoey
03/09/2022, 5:31 PMJoey
03/09/2022, 5:32 PMnotinherited
or noaccess
Joey
03/09/2022, 5:32 PMwilliamdclt
03/09/2022, 5:48 PMresourceType
is required. However, optionalResourceId
and optionalRelation
are typed as required despite their names.
Is it a typing-only issue and I should cast optionalRelation: undefined as any
, or will I encounter a runtime problem in the client?Joey
03/09/2022, 5:56 PMJoey
03/09/2022, 5:56 PMJoey
03/09/2022, 5:57 PMwilliamdclt
03/09/2022, 6:04 PMJoey
03/09/2022, 6:10 PMJoey
03/09/2022, 6:10 PM.create
it'll allow you to avoid the optionals and it'll fill them in with empty strings automaticallywilliamdclt
03/09/2022, 6:11 PMcreate
. Lemme tryJoey
03/09/2022, 6:11 PMwilliamdclt
03/09/2022, 6:12 PMcreate
has other (and worse) downsides: it makes all attributes optional 😬Joey
03/09/2022, 6:12 PMJoey
03/09/2022, 6:13 PMJoey
03/09/2022, 6:13 PMwilliamdclt
03/09/2022, 6:15 PMwilliamdclt
03/09/2022, 6:17 PMJoey
03/09/2022, 7:18 PM""
. proto3 does have a true optional
keyword now, but that might result in a wire change and thus, have to wait for a new version of the APIPotato
03/10/2022, 12:51 AMJoey
03/10/2022, 1:05 AMJoey
03/10/2022, 1:05 AMPotato
03/10/2022, 1:08 AMPotato
03/10/2022, 1:08 AMwilliamdclt
03/10/2022, 12:45 PM""
if that's what the client expects as an empty value!Joey
03/10/2022, 2:57 PMlukewestby
03/10/2022, 5:17 PMJoey
03/10/2022, 5:35 PM