File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
website/versioned_docs/version-4.0 Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -151,15 +151,15 @@ You can use the `this` variable to access any (public) property / method of the
151151``` php
152152class Post {
153153 /**
154- * @Query
155- * @Security("this.canAccess(post, user)")
154+ * @Field
155+ * @Security("this.canAccessBody( user)")
156156 */
157- public function getPost(Post $post ): array
157+ public function getBody( ): array
158158 {
159159 // ...
160160 }
161161
162- public function canAccess(Post $post, User $user): bool
162+ public function canAccessBody( User $user): bool
163163 {
164164 // Some custom logic here
165165 }
Original file line number Diff line number Diff line change @@ -152,15 +152,15 @@ You can use the `this` variable to access any (public) property / method of the
152152``` php
153153class Post {
154154 /**
155- * @Query
156- * @Security("this.canAccess(post, user)")
155+ * @Field
156+ * @Security("this.canAccessBody( user)")
157157 */
158- public function getPost(Post $post ): array
158+ public function getBody( ): array
159159 {
160160 // ...
161161 }
162162
163- public function canAccess(Post $post, User $user): bool
163+ public function canAccessBody( User $user): bool
164164 {
165165 // Some custom logic here
166166 }
You can’t perform that action at this time.
0 commit comments