I'm using NodeJS and this is my code: ``` const ...
# spicedb
u
I'm using NodeJS and this is my code:
Copy code
const stream = client.readRelationships(v1.ReadRelationshipsRequest.create({

        relationshipFilter: v1.RelationshipFilter.create({
            resourceType: system + 'project',
            optionalSubjectFilter: v1.SubjectFilter.create({
                optionalSubjectId: 'SomeId',
                subjectType: system + 'user',

            })
        })
    }))
    const data = await new Promise((resolve, reject) =>
        stream.on('data', function (data) {
            resolve(data)
        })
    )