File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ private function getParams(Request $request, array $data = []): array
8686 static ::PARAM_OPERATION_NAME => null ,
8787 ];
8888
89- // Keep a reference to the query-string
90- $ qs = $ request ->query ;
89+ // Use all query parameters, since starting from Symfony 6 there will be an exception accessing array parameters
90+ // via request->query->get(key), and another exception accessing non-array parameter via request->query->all(key)
91+ $ queryParameters = $ request ->query ->all ();
9192
9293 // Override request using query-string parameters
93- $ query = $ qs -> has ( static ::PARAM_QUERY ) ? $ qs -> get ( static :: PARAM_QUERY ) : $ data [static ::PARAM_QUERY ];
94- $ variables = $ qs -> has ( static ::PARAM_VARIABLES ) ? $ qs -> get ( static :: PARAM_VARIABLES ) : $ data [static ::PARAM_VARIABLES ];
95- $ operationName = $ qs -> has ( static ::PARAM_OPERATION_NAME ) ? $ qs -> get ( static :: PARAM_OPERATION_NAME ) : $ data [static ::PARAM_OPERATION_NAME ];
94+ $ query = $ queryParameters [ static ::PARAM_QUERY ] ?? $ data [static ::PARAM_QUERY ];
95+ $ variables = $ queryParameters [ static ::PARAM_VARIABLES ] ?? $ data [static ::PARAM_VARIABLES ];
96+ $ operationName = $ queryParameters [ static ::PARAM_OPERATION_NAME ] ?? $ data [static ::PARAM_OPERATION_NAME ];
9697
9798 // `query` parameter is mandatory.
9899 if (empty ($ query )) {
You can’t perform that action at this time.
0 commit comments