@@ -20,52 +20,52 @@ class Webhook {
2020 * @return void
2121 */
2222 public static function register (): void {
23- register_graphql_object_type ( 'Webhook ' , [
23+ register_graphql_object_type ( 'Webhook ' , [
2424 'description ' => __ ( 'A Webhook configuration object. ' , 'wp-graphql-webhooks ' ),
25- 'fields ' => [
26- 'id ' => [
25+ 'fields ' => [
26+ 'id ' => [
2727 'type ' => 'ID ' ,
2828 'description ' => __ ( 'The global ID of the webhook. ' , 'wp-graphql-webhooks ' ),
2929 'resolve ' => function ($ webhook ) {
3030 return (string ) $ webhook ->ID ;
3131 },
3232 ],
33- 'eventTrigger ' => [
33+ 'eventTrigger ' => [
3434 'type ' => 'String ' ,
3535 'description ' => __ ( 'The event hook name that triggers this webhook. ' , 'wp-graphql-webhooks ' ),
3636 'resolve ' => function ($ webhook ) {
3737 return get_post_meta ( $ webhook ->ID , '_event_trigger ' , true );
3838 },
3939 ],
40- 'title ' => [
40+ 'title ' => [
4141 'type ' => 'String ' ,
4242 'description ' => __ ( 'The title of the webhook. ' , 'wp-graphql-webhooks ' ),
4343 'resolve ' => function ($ webhook ) {
4444 return get_the_title ( $ webhook );
4545 },
4646 ],
47- 'enabled ' => [
47+ 'enabled ' => [
4848 'type ' => 'Boolean ' ,
4949 'description ' => __ ( 'Whether the webhook is enabled. ' , 'wp-graphql-webhooks ' ),
5050 'resolve ' => function ($ webhook ) {
5151 return (bool ) get_post_meta ( $ webhook ->ID , '_enabled ' , true );
5252 },
5353 ],
54- 'security ' => [
54+ 'security ' => [
5555 'type ' => 'String ' ,
5656 'description ' => __ ( 'Security information for the webhook. ' , 'wp-graphql-webhooks ' ),
5757 'resolve ' => function ($ webhook ) {
5858 return get_post_meta ( $ webhook ->ID , '_security ' , true );
5959 },
6060 ],
61- 'handlerClass ' => [
61+ 'handlerClass ' => [
6262 'type ' => 'String ' ,
6363 'description ' => __ ( 'The handler class used for dispatching. ' , 'wp-graphql-webhooks ' ),
6464 'resolve ' => function ($ webhook ) {
6565 return get_post_meta ( $ webhook ->ID , '_handler_class ' , true );
6666 },
6767 ],
68- 'handlerConfig ' => [
68+ 'handlerConfig ' => [
6969 'type ' => 'String ' ,
7070 'description ' => __ ( 'Configuration for the handler. ' , 'wp-graphql-webhooks ' ),
7171 'resolve ' => function ($ webhook ) {
@@ -75,4 +75,4 @@ public static function register(): void {
7575 ],
7676 ] );
7777 }
78- }
78+ }
0 commit comments