-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby): Improve readability of page data / long running query warnings #37220
Conversation
Alternative to #36876 Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Daniel Lew <danielshlomolew@gmail.com>
if (!_.isEmpty(context)) { | ||
messageParts.push(`Context: ${JSON.stringify(context, null, 4)}`) | ||
} | ||
if (queryJob.queryType === `page`) { |
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 TS type said that isPage
is not actually a thing on that object
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.
Ah yes, isPage
was changed to queryType
when I added slice queries as then we had 3 options for queries (page, static and slice) that no longer would work with single boolean and decided type is better than adding isSlice
or isStatic
on top of isPage
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.
So that means that since v5 we were actually not showing path or context on those long running queries I guess?
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.
I seems like that 😆
…rnings (#37220) * show better page data information * clean up longrunning queries Alternative to #36876 Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Daniel Lew <danielshlomolew@gmail.com> Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Daniel Lew <danielshlomolew@gmail.com> (cherry picked from commit 031a08f)
…rnings (#37220) (#37229) * show better page data information * clean up longrunning queries Alternative to #36876 Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Daniel Lew <danielshlomolew@gmail.com> Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Daniel Lew <danielshlomolew@gmail.com> (cherry picked from commit 031a08f) Co-authored-by: Lennart <lekoarts@gmail.com>
Description
The goal of this PR is to improve the readability of errors while HTML rendering and the warnings about long running queries. It's improved by removing verbosity that isn't that all too helpful.
Related Issues
[ch59128]