The docs for @withVisibility show this example
model Dog {
@visibility("read") id: int32;
@visibility("create", "update") secretName: string;
name: string;
}
// The spread operator will copy all the properties of Dog into DogRead,
// and @withVisibility will then remove those that are not visible with
// create or update visibility.
//
// In this case, the id property is removed, and the name and secretName
// properties are kept.
@withVisibility("create", "update")
model DogCreateOrUpdate {
...Dog;
}
but the actual behavior as shown in the playground does not match the description in the doc.
Playground Link
Note that secretName does not appear in either Dog or DogCreateOrUpdate.
The docs for
@withVisibilityshow this examplebut the actual behavior as shown in the playground does not match the description in the doc.
Playground Link
Note that
secretNamedoes not appear in eitherDogorDogCreateOrUpdate.