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

Update StaticQuery documentation #6452

Closed
wants to merge 3 commits into from
Closed

Update StaticQuery documentation #6452

wants to merge 3 commits into from

Conversation

iamhitarth
Copy link
Contributor

To explicitly make it clear that StaticQuery should NOT be used on page components and doing so will result in a Loading (StaticQuery) message showing up on the page.

iamhitarth and others added 3 commits July 14, 2018 22:50
To explicitly make it clear that StaticQuery should NOT be used on page components and doing so will result in a Loading (StaticQuery) message showing up on the page.
@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit bfaa261

https://deploy-preview-6452--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit bfaa261

https://deploy-preview-6452--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit 089754b

https://deploy-preview-6452--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 089754b

https://deploy-preview-6452--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 136cba4

https://deploy-preview-6452--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit 136cba4

https://deploy-preview-6452--using-drupal.netlify.com

@LekoArts
Copy link
Contributor

As far as I know Loading (StaticQuery) is just a bug and it's perfectly fine to use StaticQueries in page components. Where did you get that information?

@jquense
Copy link
Contributor

jquense commented Jul 14, 2018

yes, StaticQuery should be usable everywhere if it's not there is a bug we need to fix 👍

@iamhitarth
Copy link
Contributor Author

iamhitarth commented Jul 15, 2018

@LekoArts @jquense in my Gatsby site that I migrated to v2 last night, using StaticQuery on a page component kept resulting in Loading (StaticQuery) as the only thing that would show up on the page.

See issue #6350 for more details.

Let me know if there is any additional information I can provide to help.

@LekoArts
Copy link
Contributor

It‘s still a bug or a wrong use (two queries in the page component). If the latter you should try it with only one query at a time.

@m-allanson
Copy link
Contributor

Thanks @iamhitarth! This sounds like it's a bug and not intended behaviour so I've updated the linked issue #6350 with a demo. I'm going to close this as we should fix the bug instead :)

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

Successfully merging this pull request may close these issues.

5 participants