File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
plugins/wpgraphql-logging/src/Admin/Settings/Fields/Tab Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,20 @@ class Basic_Configuration_Tab implements Settings_Tab_Interface {
5252 */
5353 public const EVENT_LOG_SELECTION = 'event_log_selection ' ;
5454
55+ /**
56+ * The field ID for the seed query exclusion for Faust.js.
57+ *
58+ * @var string
59+ */
60+ public const SEED_QUERY = 'seed_query ' ;
61+
62+ /**
63+ * The field ID for whether to log the response from the WPGGraphQL query into the context object.
64+ *
65+ * @var string
66+ */
67+ public const LOG_RESPONSE = 'log_response ' ;
68+
5569 /**
5670 * Get the name/identifier of the tab.
5771 */
@@ -134,6 +148,23 @@ public function get_fields(): array {
134148 true
135149 );
136150
151+
152+ $ fields [ self ::SEED_QUERY ] = new Checkbox_Field (
153+ self ::SEED_QUERY ,
154+ $ this ->get_name (),
155+ __ ( 'Log Seed Query ' , 'wpgraphql-logging ' ),
156+ '' ,
157+ __ ( 'Whether or not to log the Faust.js seed query. ' , 'wpgraphql-logging ' ),
158+ );
159+
160+ $ fields [ self ::LOG_RESPONSE ] = new Checkbox_Field (
161+ self ::LOG_RESPONSE ,
162+ $ this ->get_name (),
163+ __ ( 'Log Response ' , 'wpgraphql-logging ' ),
164+ '' ,
165+ __ ( 'Whether or not to log the response from the WPGraphQL query into the context object. ' , 'wpgraphql-logging ' ),
166+ );
167+
137168 return apply_filters ( 'wpgraphql_logging_basic_configuration_fields ' , $ fields );
138169 }
139170}
You can’t perform that action at this time.
0 commit comments