Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] GraphQL Debug Log #4936

Closed
andrewfairlie opened this issue Sep 13, 2019 · 4 comments
Closed

[Feature Request] GraphQL Debug Log #4936

andrewfairlie opened this issue Sep 13, 2019 · 4 comments

Comments

@andrewfairlie
Copy link

I haven't seen other GraphQL implementations do this, but a thought is that it would be great if we could request a field called something like debug which returns a log of the database requests so we can spot what in the query might be taking time so we can optimise it.

@narration-sd
Copy link
Contributor

If the data you want were in a database table, you could just query that from any GraphQL...

First late night thought is that it could be done with a plugin

@brandonkelly
Copy link
Member

You can use the Debug Toolbar for this! Make sure it’s enabled, and then look for the X-Debug-Link header on the API response. That will give you a URL you can go to, to view a full-page debug toolbar output of the API request.

The X-Debug-Link header on a GraphQL API response

@andrewfairlie
Copy link
Author

Well that's just outstanding. Thanks @brandonkelly

@narration-sd
Copy link
Contributor

ha, yes, forgot that...

They always accuse me of over-complicating, @andrewfairlie ;)
Also, other matters not forgotten, just busy accomodating Craft motions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants