Apparently it's on the relationship field, inside ...
# spicedb
t
Apparently it's on the relationship field, inside the RelationshipUpdate type
Copy code
const writeRelationshipRequest = v1.WriteRelationshipsRequest.create({
      updates: [
        v1.RelationshipUpdate.create({ 
 here-->   relationship: v1.Relationship.create({
            resource: v1.ObjectReference.create({
              objectType: 'employee',
              objectId: 'somedocument',
            }),
            relation: 'viewer',
            subject: v1.SubjectReference.create({
              object: v1.ObjectReference.create({
                objectType: 'test/user',
                objectId: 'fred',
              }),
            }),
          }),
          operation: v1.RelationshipUpdate_Operation.CREATE,
        }),
      ],
    });
3 Views