Following Gatsby setup tutorial and it doesn't seem to be working correctly

Hey there,

I've been following this tutorial and after figuring out how to get the gatsby-source-prismic plugin working my graphql queries look bizarre and nothing like what I see on any examples of what Prismic queries should look like.

For example, the tutorial says I should be able to query prismicAllHomepage for banner titles, text, and everything else you should be able to grab from that document, however, I don't see any of that. It looks like I can query the homepage document 5 different ways with queries like: allPrismicHomepageBodyFullWidthImage, allPrismicHomepageBodyTextthat give me different results.

Is this intended? I'm coming from, which gives you very similar graphql queries, at least I thought so. I don't really understand how I'm supposed to work with what I'm seeing right now. Can anyone help me out and explain what's going on here?

Hey, welcome to the community!

Queries do look different using gatsby-source-prismic. Have you taken a look at this article? It gives a clear idea of the differences in the queries between plugins.

In any case, we are about to release a new version of the documentation that will cover up only the plugin that you're using; we'll release it in the next few days!

In the meantime, we can still try and debug your queries together. The first example that you shared is not quite right. Instead, it should be AllPrismicHomepage.

And yes, there are many options to start your queries, the common ones you should use are: AllPrismic${Customtype} and prismic${Customtype}

Update: New version of the Gatsby documentation is now live!

Thanks for the reply, Paulina. I'll check this out!

1 Like

This issue has been closed due to inactivity. Flag to reopen.