Problem using graphQuery

Hi

I need some insights from more experienced users.

We only recently started using Prismic with Svelte, for a client's new web application and blog integration.

The experience so far has been fantastic!

In a further enhancement, we need to extract a small subset of data from Prismic in order to show a blog roll with only essential details of each blog post, like title, author, featured image etc.

To do that it seems that graphQuery through the API is a good solution. But for the life of Hercules and all his children, we cannot get the query to work as expected.

Here is a simplified version of the graphQuery part of the query string we are using:

graphQuery={blog_post{data{title}}}

This shows the blog_post custom type, with the title property to be returned.

However, when running the query (with the encoded graphQuery above) we always receive the full payload with the full blog content.

Reading (and reading again) the docs, I cannot see where I'm going wrong.

Any assistance or insights will be greatly appreciated.

Many thanks!

Hi @cloudrendr,

Welcome to the community! I'm glad to hear you're enjoying the product :slight_smile:

If you're getting your getting the full payload of your document from your standard query and maybe the GraphQuery option is failing, can you share with me your full query, not just the GraphQuery?

Thanks.