You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,36 +81,36 @@ Because of the verbosity of these types, we recommend writing your own functions
80
81
The `create` method on generated classes takes attributes as input and defaults unspecified attributes to their empty value. This allows you to create request messages, for example, by specifying only relevant fields and leaves optional fields empty.
81
82
82
83
```js
83
-
import { v1 } from'@authzed/authzed-node';
84
+
import { v1 } from"@authzed/authzed-node";
84
85
85
-
constclient=v1.NewClient('token')
86
+
constclient=v1.NewClient("token");
86
87
87
88
// Create the relationship between the resource and the user.
88
89
constfirstPost=v1.ObjectReference.create({
89
-
objectType:"blog/post",
90
-
objectId:"1",
90
+
objectType:"blog/post",
91
+
objectId:"1",
91
92
});
92
93
93
94
// Create the user reference.
94
95
constemilia=v1.ObjectReference.create({
95
-
objectType:"blog/user",
96
-
objectId:"emilia",
96
+
objectType:"blog/user",
97
+
objectId:"emilia",
97
98
});
98
99
99
100
// Create the subject reference using the user reference
@@ -131,9 +132,9 @@ const result = await promiseClient.checkPermission(checkPermissionRequest);
131
132
For stream-returning methods, including `client.readRelationships()`, `client.lookupResources()` and `client.lookupSubjects()`, the promise-style method will result in an array of response objects once the stream has been closed.
0 commit comments