# \#graphquery

**URL:** https://community.prismic.io/tag/graphquery/29.md

[Latest](https://community.prismic.io/latest.md) · [Categories](https://community.prismic.io/categories.md) · [Tags](https://community.prismic.io/tags.md)

---

## [How to fetch specific fields in a non-deprecated way](https://community.prismic.io/t/how-to-fetch-specific-fields-in-a-non-deprecated-way/19997)

<div class="topic-metadata">

**Author:** [@connor](https://community.prismic.io/u/connor)\
**Replies:** 4\
**Last updated:** [September 30, 2025, 2:31pm UTC](https://community.prismic.io/t/how-to-fetch-specific-fields-in-a-non-deprecated-way/19997 "2025-09-30T14:31:28Z")

</div>

Hello, We have a quite large custom type which is used on a lot of pages, but some pages only need one or two fields from this document, so we thought it would be smart to only fetch what is needed. I had planned to us…

---

## [What is the recommended way to only fetch specific fields with the Prismic client?](https://community.prismic.io/t/what-is-the-recommended-way-to-only-fetch-specific-fields-with-the-prismic-client/19940)

<div class="topic-metadata">

**Author:** [@ollie3](https://community.prismic.io/u/ollie3)\
**Replies:** 1\
**Last updated:** [August 14, 2025, 1:33pm UTC](https://community.prismic.io/t/what-is-the-recommended-way-to-only-fetch-specific-fields-with-the-prismic-client/19940 "2025-08-14T13:33:38Z")

</div>

I'm using the prismic client to fetch some data and I only need the uid: const pages = await client.getAllByType("page"); return pages.map(({ uid }) =\> ({ uid })); From what I can find in the online documentation, the …

---

## [Graph Query: Get Relationship inside Repeatable inside Slice of Page](https://community.prismic.io/t/graph-query-get-relationship-inside-repeatable-inside-slice-of-page/18516)

<div class="topic-metadata">

**Author:** [@mrsebastienleblanc](https://community.prismic.io/u/mrsebastienleblanc)\
**Replies:** 3\
**Last updated:** [March 13, 2025, 3:22am UTC](https://community.prismic.io/t/graph-query-get-relationship-inside-repeatable-inside-slice-of-page/18516 "2025-03-13T03:22:07Z")

</div>

Hi, As the title says, I have a "home" Page (Single Type), which has a "home\_tickets" Slice. This slice has a "tickets" Repeatable Group, this group has a single "ticket\_type" Content Relationship field. This relations…

---

## [GraphQuery Content Relationship Sub Fields in Slice](https://community.prismic.io/t/graphquery-content-relationship-sub-fields-in-slice/18073)

<div class="topic-metadata">

**Author:** [@adam7](https://community.prismic.io/u/adam7)\
**Replies:** 2\
**Last updated:** [December 2, 2024, 8:57am UTC](https://community.prismic.io/t/graphquery-content-relationship-sub-fields-in-slice/18073 "2024-12-02T08:57:12Z")

</div>

Hi all, thanks in advance for taking the time to help with this. I've been reviewing documentation and forum questions for a while now and am still stumped on how to get a graphquery to work for content relationships in…

---

## [GraphQuery breaks if new field is in the query](https://community.prismic.io/t/graphquery-breaks-if-new-field-is-in-the-query/18031)

<div class="topic-metadata">

**Author:** [@diego.arias94](https://community.prismic.io/u/diego.arias94)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 10:35am UTC](https://community.prismic.io/t/graphquery-breaks-if-new-field-is-in-the-query/18031 "2024-11-21T10:35:37Z")

</div>

When I add a field to a customtype for example, and I use a graphQuery query to fetch that new field, all the existing documents that havent been saved with this new pushed field return an error response when fetched. F…

---

## [Help With GraphQuery: Repeatable Group With Content Relationships](https://community.prismic.io/t/help-with-graphquery-repeatable-group-with-content-relationships/17906)

<div class="topic-metadata">

**Author:** [@josh.klope](https://community.prismic.io/u/josh.klope)\
**Replies:** 6\
**Last updated:** [November 8, 2024, 5:23pm UTC](https://community.prismic.io/t/help-with-graphquery-repeatable-group-with-content-relationships/17906 "2024-11-08T17:23:44Z")

</div>

I have a "Settings" document with a repeatable group called "Navigation." This group has one field called "Mega Menu Item." It's a content relationship that can link to Mega Menu Item documents, each of which has its own…

---

## [Help with graphquery](https://community.prismic.io/t/help-with-graphquery/17912)

<div class="topic-metadata">

**Author:** [@tudor2004](https://community.prismic.io/u/tudor2004)\
**Replies:** 1\
**Last updated:** [November 2, 2024, 6:07pm UTC](https://community.prismic.io/t/help-with-graphquery/17912 "2024-11-02T18:07:31Z")

</div>

I have the following query: const home = await client.getSingle("homepage", { graphQuery: \` { homepage { ...homepageFields slices { ...on boxes { variation { …

---

## [GraphQL type names are different in GraphiQL editor than what is needed for GraphQuery](https://community.prismic.io/t/graphql-type-names-are-different-in-graphiql-editor-than-what-is-needed-for-graphquery/14226)

<div class="topic-metadata">

**Author:** [@travis.travis](https://community.prismic.io/u/travis.travis)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 8:42am UTC](https://community.prismic.io/t/graphql-type-names-are-different-in-graphiql-editor-than-what-is-needed-for-graphquery/14226 "2023-10-02T08:42:35Z")

</div>

I am trying to figure out the most reasonable way to build large graphQueries. The autocompletion in the GraphiQL editor (e.g. Graphql - Prismic) is extremely helpful for this. Unfortunately, in specific cases such as re…

---

## [NotFoundError: No documents were returned](https://community.prismic.io/t/notfounderror-no-documents-were-returned/17714)

<div class="topic-metadata">

**Author:** [@muzammilloya](https://community.prismic.io/u/muzammilloya)\
**Replies:** 1\
**Last updated:** [September 30, 2024, 4:32pm UTC](https://community.prismic.io/t/notfounderror-no-documents-were-returned/17714 "2024-09-30T16:32:00Z")

</div>

The code isn't returning my Documents import \* as prismic from '@prismicio/client'; /\*\* \* @param {Object} args \* @param {prismic.Content.CaseStudiesSlice} args.slice \* @param {{ client: prismic.Client\<prismic.Content…

---

## [Query id, uid, type, lang and url for a type of document](https://community.prismic.io/t/query-id-uid-type-lang-and-url-for-a-type-of-document/16605)

<div class="topic-metadata">

**Author:** [@JeffDev](https://community.prismic.io/u/JeffDev)\
**Replies:** 1\
**Last updated:** [September 4, 2024, 3:19pm UTC](https://community.prismic.io/t/query-id-uid-type-lang-and-url-for-a-type-of-document/16605 "2024-09-04T15:19:46Z")

</div>

Hello I'd like to only query the id, uid, type, lang and url for a document type ? I'm currently writing an API endpoint in my next.js application that will render pages for a specific type of document. I wrote the co…

---

## [Need help with graph query and returning fields](https://community.prismic.io/t/need-help-with-graph-query-and-returning-fields/16413)

<div class="topic-metadata">

**Author:** [@tudor2004](https://community.prismic.io/u/tudor2004)\
**Replies:** 7\
**Last updated:** [August 12, 2024, 6:30pm UTC](https://community.prismic.io/t/need-help-with-graph-query-and-returning-fields/16413 "2024-08-12T18:30:29Z")

</div>

I have a document that looks like this: { "id": "YVFtzxEAACMAUusa", "uid": "abcde", "first\_publication\_date": "2021-09-27T07:08:03+0000", "last\_publication\_date": "2022-08-16T15:0…

---

## [Not getting data content relationship links from a slice](https://community.prismic.io/t/not-getting-data-content-relationship-links-from-a-slice/16475)

<div class="topic-metadata">

**Author:** [@monilal.kumbhakar](https://community.prismic.io/u/monilal.kumbhakar)\
**Replies:** 4\
**Last updated:** [August 9, 2024, 2:33pm UTC](https://community.prismic.io/t/not-getting-data-content-relationship-links-from-a-slice/16475 "2024-08-09T14:33:32Z")

</div>

Describe your question/issue in detail Not getting data content relationship links from a slice I need help to write a graph query to fetch linked documents inside a slice. A linked document can be any custom type, is t…

---

## [fetchLinks/GraqhQuery and Routes](https://community.prismic.io/t/fetchlinks-graqhquery-and-routes/16039)

<div class="topic-metadata">

**Author:** [@thejuniperstudio](https://community.prismic.io/u/thejuniperstudio)\
**Replies:** 4\
**Last updated:** [June 25, 2024, 2:57am UTC](https://community.prismic.io/t/fetchlinks-graqhquery-and-routes/16039 "2024-06-25T02:57:14Z")

</div>

I'm using Gatby-source-prismic for a website. I know this isn't supported anymore but hopefully, the question I have is about implementation rather than a bug: I have a field in my Prismic page document called 'director…

---

## [Mega Menu - NextJS in 2024](https://community.prismic.io/t/mega-menu-nextjs-in-2024/16110)

<div class="topic-metadata">

**Author:** [@joel1](https://community.prismic.io/u/joel1)\
**Replies:** 2\
**Last updated:** [June 19, 2024, 2:37pm UTC](https://community.prismic.io/t/mega-menu-nextjs-in-2024/16110 "2024-06-19T14:37:02Z")

</div>

Hey all, I have followed the Mega menu blogpost to the tee found here I have also looked at all the previous topic 'answers' and none of them seem to work as of now. I for the life of me can not figure out how to get t…

---

## [GraphQuery fetch content from Content Relationship fields - Suggestions](https://community.prismic.io/t/graphquery-fetch-content-from-content-relationship-fields-suggestions/15921)

<div class="topic-metadata">

**Author:** [@aadtyaraj01](https://community.prismic.io/u/aadtyaraj01)\
**Replies:** 2\
**Last updated:** [May 24, 2024, 6:55am UTC](https://community.prismic.io/t/graphquery-fetch-content-from-content-relationship-fields-suggestions/15921 "2024-05-24T06:55:25Z")

</div>

Here's my code for review Is this the most efficient way or can i do something better +page.server.ts export async function load({ params, fetch, cookies }) { const client = createClient({ fetch, cookies }); const p…

---

## [Can graphQuery fetch only the first item of a group field?](https://community.prismic.io/t/can-graphquery-fetch-only-the-first-item-of-a-group-field/15831)

<div class="topic-metadata">

**Author:** [@codyslexia](https://community.prismic.io/u/codyslexia)\
**Replies:** 1\
**Last updated:** [May 2, 2024, 11:49am UTC](https://community.prismic.io/t/can-graphquery-fetch-only-the-first-item-of-a-group-field/15831 "2024-05-02T11:49:55Z")

</div>

Hello there, Quick question: Can graphQuery fetch only the first item of a group field?

---

## [Fetching Linked content](https://community.prismic.io/t/fetching-linked-content/15685)

<div class="topic-metadata">

**Author:** [@max2](https://community.prismic.io/u/max2)\
**Replies:** 1\
**Last updated:** [April 19, 2024, 7:42am UTC](https://community.prismic.io/t/fetching-linked-content/15685 "2024-04-19T07:42:26Z")

</div>

I've tried to fetch linked contents but got this error. "You cannot go deeper than 3 levels of documents." Can you solve this? await client.getByUID("link\_list", "header-left", { graphQuery: \`{ link\_list{ …

---

## [Help with access data of custom type in a relationship field in a group field](https://community.prismic.io/t/help-with-access-data-of-custom-type-in-a-relationship-field-in-a-group-field/15663)

<div class="topic-metadata">

**Author:** [@marvin.bernd](https://community.prismic.io/u/marvin.bernd)\
**Replies:** 2\
**Last updated:** [April 9, 2024, 1:43pm UTC](https://community.prismic.io/t/help-with-access-data-of-custom-type-in-a-relationship-field-in-a-group-field/15663 "2024-04-09T13:43:04Z")

</div>

Hey everyone, I know there are many topics about content relationship fields in groups and how to access their data using graphquery. But I still can't get it to work. Also TypeScript is always yelling because it don't …

---

## [graphQuery with content relationship form a slice, and adding styling to a prismic component](https://community.prismic.io/t/graphquery-with-content-relationship-form-a-slice-and-adding-styling-to-a-prismic-component/15409)

<div class="topic-metadata">

**Author:** [@nilenarrator](https://community.prismic.io/u/nilenarrator)\
**Replies:** 1\
**Last updated:** [March 19, 2024, 12:02am UTC](https://community.prismic.io/t/graphquery-with-content-relationship-form-a-slice-and-adding-styling-to-a-prismic-component/15409 "2024-03-19T00:02:10Z")

</div>

Hello there, Thank you for this wonderful tool I'm struggling with 2 things 1- fetching content relationship from a slice, I created a reusable project type page and added a hero slice to it, and on my homepage I have…

---

## [Fetching nested content relationship fields](https://community.prismic.io/t/fetching-nested-content-relationship-fields/15108)

<div class="topic-metadata">

**Author:** [@davidmarkl](https://community.prismic.io/u/davidmarkl)\
**Replies:** 3\
**Last updated:** [February 6, 2024, 11:35am UTC](https://community.prismic.io/t/fetching-nested-content-relationship-fields/15108 "2024-02-06T11:35:49Z")

</div>

I have a mainMenu customtype which hold a Group of mainMenuItems with label and page\_or\_submenu fileds. page\_or\_submenu is a content relationship field which can hold either a page type or a submenu type. The submenu typ…

---

## [Is it possible to fetch documents are linked to a non-linked document?](https://community.prismic.io/t/is-it-possible-to-fetch-documents-are-linked-to-a-non-linked-document/15024)

<div class="topic-metadata">

**Author:** [@codyslexia](https://community.prismic.io/u/codyslexia)\
**Replies:** 4\
**Last updated:** [January 23, 2024, 10:21am UTC](https://community.prismic.io/t/is-it-possible-to-fetch-documents-are-linked-to-a-non-linked-document/15024 "2024-01-23T10:21:15Z")

</div>

I have product type that have content relationship to a category type. :white\_check\_mark: I can fetch category using fetchLinks when getting all product documents. :question: Can I get product documents when getting al…

---

## [Get related content via graphQuery doesn't work](https://community.prismic.io/t/get-related-content-via-graphquery-doesnt-work/14589)

<div class="topic-metadata">

**Author:** [@marianbreitmeyer](https://community.prismic.io/u/marianbreitmeyer)\
**Replies:** 3\
**Last updated:** [November 28, 2023, 9:33pm UTC](https://community.prismic.io/t/get-related-content-via-graphquery-doesnt-work/14589 "2023-11-28T21:33:59Z")

</div>

Hi, i just try to develop my first prismic project – a simple portfolio. So i have Pages for every Project/Case, but also a Custom Type for ProjectTeaser with content realtions fields for image/stageimage, projecttitle …

---

## [Get content relationship links from a slice](https://community.prismic.io/t/get-content-relationship-links-from-a-slice/14291)

<div class="topic-metadata">

**Author:** [@pali](https://community.prismic.io/u/pali)\
**Replies:** 10\
**Last updated:** [October 25, 2023, 3:14pm UTC](https://community.prismic.io/t/get-content-relationship-links-from-a-slice/14291 "2023-10-25T15:14:58Z")

</div>

I am creating the following structure content Page --Slice ----Content Relationship Link ------Content Relationship Link When I query the page using fetchLinks, I can't get to the content relationship links when try…

---

## [GraqhQL Doesn't Work](https://community.prismic.io/t/graqhql-doesnt-work/14091)

<div class="topic-metadata">

**Author:** [@brian1](https://community.prismic.io/u/brian1)\
**Replies:** 1\
**Last updated:** [September 28, 2023, 1:58pm UTC](https://community.prismic.io/t/graqhql-doesnt-work/14091 "2023-09-28T13:58:51Z")

</div>

Hi, I am running into an issue with a blog page where it is loading in all of the data from each blog post for the index page. I have tried both adding the 'fetch' option as well as a graphQuery option (separate tests).…

---

## [Properly typing Content Relationships](https://community.prismic.io/t/properly-typing-content-relationships/13918)

<div class="topic-metadata">

**Author:** [@nick3](https://community.prismic.io/u/nick3)\
**Replies:** 1\
**Last updated:** [August 23, 2023, 2:12pm UTC](https://community.prismic.io/t/properly-typing-content-relationships/13918 "2023-08-23T14:12:41Z")

</div>

I am trying to build a mega menu for a my header but am running into a type error and was wondering if anyone had run into this and how you solved it? I am importing the generated types from @/prismicio-types. interface…

---

## [Bug in GraphQuery API](https://community.prismic.io/t/bug-in-graphquery-api/13149)

<div class="topic-metadata">

**Author:** [@s.vanderheide](https://community.prismic.io/u/s.vanderheide)\
**Replies:** 4\
**Last updated:** [May 23, 2023, 5:42pm UTC](https://community.prismic.io/t/bug-in-graphquery-api/13149 "2023-05-23T17:42:33Z")

</div>

Hello, I found a bug in the GraphQuery API. When using it as below to retrieve multiple content relationships I'm getting the error an invalid api response was returned. This doesn't happen when I replace ...secondField…

---

## [Querying a grouped collection within a grouped collection](https://community.prismic.io/t/querying-a-grouped-collection-within-a-grouped-collection/12914)

<div class="topic-metadata">

**Author:** [@nuurcodes](https://community.prismic.io/u/nuurcodes)\
**Replies:** 3\
**Last updated:** [April 19, 2023, 7:46pm UTC](https://community.prismic.io/t/querying-a-grouped-collection-within-a-grouped-collection/12914 "2023-04-19T19:46:15Z")

</div>

I would like to query a collection group within a collection group. I can successfully get the root level information for the nested collection group but cannot get the 'data' for nested collection group graphQuery:…

---

## [I need help with graphQuery use](https://community.prismic.io/t/i-need-help-with-graphquery-use/12891)

<div class="topic-metadata">

**Author:** [@max.cttn](https://community.prismic.io/u/max.cttn)\
**Replies:** 2\
**Last updated:** [April 13, 2023, 2:03pm UTC](https://community.prismic.io/t/i-need-help-with-graphquery-use/12891 "2023-04-13T14:03:27Z")

</div>

Hello to all, I'm coming to you because I'm stuck with my requests to Prismic in my NextJS application. I have a main request that calls my custom type homepage which contains all the slices on the page. For the examp…

---

## [Replacing fetchLinks with graphQuery](https://community.prismic.io/t/replacing-fetchlinks-with-graphquery/12761)

<div class="topic-metadata">

**Author:** [@amos](https://community.prismic.io/u/amos)\
**Replies:** 1\
**Last updated:** [March 27, 2023, 10:30am UTC](https://community.prismic.io/t/replacing-fetchlinks-with-graphquery/12761 "2023-03-27T10:30:06Z")

</div>

Hi, I'm currently using Next.js with the slice machine and have a slice called "FAQSection" which has links to the custom type "FAQ". I also have different custom types for different types of pages, and for each page I …

---

## [\[BUG\] Can't filter by date properly on GraphQL](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552)

<div class="topic-metadata">

**Author:** [@g.rosado](https://community.prismic.io/u/g.rosado)\
**Replies:** 3\
**Last updated:** [March 6, 2023, 4:39pm UTC](https://community.prismic.io/t/bug-cant-filter-by-date-properly-on-graphql/12552 "2023-03-06T16:39:52Z")

</div>

Hi. I think I found a bug relating to the filter functions on GraphQL. I'm trying to show all "trips" that are on a specific month. In my query, I filter the trips by selecting a month; therefore, I filter by the ran…

[Next page](https://community.prismic.io/tag/graphquery/29.md?match_all_tags=true&page=1&tags%5B%5D=graphquery)
