sajad torkamani

Suppose you have a Client entity and a corresponding /v1/clients endpoint that should return the list of clients. You might have enabled several filters and added some custom extensions, potentially affecting the SQL query that executes against your client table.

To view what SQL query gets generated for a given request, you can open the Symfony Profiler, go to the Doctrine panel and use your browser’s find shortcut (e.g., Cmd + F for Chrome on macOS) to search for something like from <database_table>.

API Platform: Inspect the SQL query that runs for a given endpoint

Once you locate the relevant query, click on the View runnable query button to get a runnable SQL query that you can paste and execute in an app like TablePlus.

API Platform: Inspect the SQL query that runs for a given endpoint