-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GraphQL] Add information about debugging #4013
Conversation
An admin must run tests on this PR before it can be merged. |
title: Debugging GraphQL queries | ||
--- | ||
|
||
In this section you will find recommendations on how to debug GraphQL requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this section you will find recommendations on how to debug GraphQL requests. | |
This topic provides recommendations on how to debug GraphQL requests. |
|
||
## Debugging with PHPStorm and Xdebug | ||
|
||
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries you might need to debug the request processing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries you might need to debug the request processing. | |
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries, you might need to debug the request processing. |
## Debugging with PHPStorm and Xdebug | ||
|
||
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries you might need to debug the request processing. | ||
It is possible to use Xdebug for debugging the PHP execution of GraphQL query as well as we do for other HTTP requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to use Xdebug for debugging the PHP execution of GraphQL query as well as we do for other HTTP requests. | |
You can use Xdebug for debugging the PHP execution of a GraphQL query just as you would for other HTTP requests. |
|
||
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries you might need to debug the request processing. | ||
It is possible to use Xdebug for debugging the PHP execution of GraphQL query as well as we do for other HTTP requests. | ||
In order to start debugging you can simply add the additional `?XDEBUG_SESSION_START=PHPSTORM` parameter to the endpoint url. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to start debugging you can simply add the additional `?XDEBUG_SESSION_START=PHPSTORM` parameter to the endpoint url. | |
To start debugging, add the `?XDEBUG_SESSION_START=PHPSTORM` parameter to the endpoint URL. |
When [using GraphiQL]({{ page.baseurl }}/graphql/index.html#how-to-access-graphql) or any other client for testing GraphQL queries you might need to debug the request processing. | ||
It is possible to use Xdebug for debugging the PHP execution of GraphQL query as well as we do for other HTTP requests. | ||
In order to start debugging you can simply add the additional `?XDEBUG_SESSION_START=PHPSTORM` parameter to the endpoint url. | ||
The following example shows how to establish connection between Xdebug and PHPStorm IDE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following example shows how to establish connection between Xdebug and PHPStorm IDE. | |
The following example shows how to establish a connection between Xdebug and PHPStorm IDE. |
http://<magento2-3-server>/graphql?XDEBUG_SESSION_START=PHPSTORM | ||
``` | ||
|
||
There is also another possible way to enable Xdebug connection for particular request by setting the corresponding header parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also another possible way to enable Xdebug connection for particular request by setting the corresponding header parameter. | |
You can also enable an Xdebug connection for a particular request by setting the corresponding header parameter. |
Cookie: XDEBUG_SESSION=PHPSTORM | ||
``` | ||
|
||
As result Xdebug within the PHP execution attempts to make a connection to an IDE. If the IDE is listening, it will give the instructions to Xdebug about breakpoints etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As result Xdebug within the PHP execution attempts to make a connection to an IDE. If the IDE is listening, it will give the instructions to Xdebug about breakpoints etc. | |
As a result, Xdebug within the PHP execution attempts to make a connection to an IDE. If the IDE is listening, it will give the instructions to Xdebug about breakpoints and other relevant information. |
Hello @keharper, Thank you! |
running tests |
Hi @dmytro-ch, thank you for your contribution! |
Thanks for your contribution, @dmytro-ch |
@keharper please add |
This PR is a:
Summary
This PR adds information about debugging GraphQL queries.
The new page is created and the corresponding link is added into the Development section of navigation menu.
Additional information
List all affected URLs
whatsnew
Added a topic about GraphQL debugging.