@@ -206,24 +206,24 @@ public function graphql_mutation_insert( $post_object, $filtered_input, $input,
206206 public function graphql_query_contains_query_id_cb ( $ parsed_body_params , $ request_context ) {
207207
208208 // Normalize keys to handle both `queryId` and `queryid`.
209- $ query_id_key = isset ($ parsed_body_params ['queryId ' ]) ? 'queryId ' : (isset ($ parsed_body_params ['queryid ' ]) ? 'queryid ' : null );
209+ $ query_id_key = isset ( $ parsed_body_params ['queryId ' ] ) ? 'queryId ' : ( isset ( $ parsed_body_params ['queryid ' ] ) ? 'queryid ' : null );
210210
211211 // If both query and queryId/queryid are set
212212 if ( ! empty ( $ parsed_body_params ['query ' ] ) && ! empty ( $ query_id_key ) ) {
213213 // Save the query
214- $ this ->save ( $ parsed_body_params [$ query_id_key ], $ parsed_body_params ['query ' ] );
214+ $ this ->save ( $ parsed_body_params [ $ query_id_key ], $ parsed_body_params ['query ' ] );
215215
216216 // Remove it from processed body params so graphql-php operation proceeds without conflict.
217217 unset( $ parsed_body_params ['query ' ] );
218218 }
219219
220220 // If the query is empty, but queryId/queryid is set
221221 if ( empty ( $ parsed_body_params ['query ' ] ) && ! empty ( $ query_id_key ) ) {
222- $ query_string = $ this ->get ( $ parsed_body_params [$ query_id_key ] );
222+ $ query_string = $ this ->get ( $ parsed_body_params [ $ query_id_key ] );
223223 if ( ! empty ( $ query_string ) ) {
224224 $ parsed_body_params ['query ' ] = $ query_string ;
225- $ parsed_body_params ['originalQueryId ' ] = $ parsed_body_params [$ query_id_key ];
226- unset( $ parsed_body_params [$ query_id_key ] );
225+ $ parsed_body_params ['originalQueryId ' ] = $ parsed_body_params [ $ query_id_key ];
226+ unset( $ parsed_body_params [ $ query_id_key ] );
227227 }
228228 }
229229
0 commit comments