# References data in builder-component state

**URL:** <https://forum.builder.io/t/references-data-in-builder-component-state/269>\
**Category:** Technical Questions\
**Created:** [October 27, 2020, 2:54am UTC](https://forum.builder.io/t/references-data-in-builder-component-state/269 "2020-10-27T02:54:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aubergine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aubergine/32/123_2.png) [@aubergine](https://forum.builder.io/u/aubergine)\
**Post date:** [October 27, 2020, 2:54am UTC](https://forum.builder.io/t/references-data-in-builder-component-state/269/1 "2020-10-27T02:54:20Z")

</div>

Hi, is it possible to have references data in builderState? i have custom field of type list of references.

> <https://github.com/BuilderIO/builder/blob/15e80fcdd01f562123d95b03ed20c4e18f3f2a0f/packages/react/src/components/builder-block.component.tsx#L693>

---

<div class="post-metadata">

**Author:** ![aubergine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aubergine/32/123_2.png) [@aubergine](https://forum.builder.io/u/aubergine)\
**Post date:** [October 27, 2020, 2:58am UTC](https://forum.builder.io/t/references-data-in-builder-component-state/269/2 "2020-10-27T02:58:26Z")

</div>

I’d like to have references data from parent component of type Page

---

<div class="post-metadata">

**Author:** ![anon30523337](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon30523337](https://forum.builder.io/u/anon30523337)\
**Post date:** [October 27, 2020, 4:30pm UTC](https://forum.builder.io/t/references-data-in-builder-component-state/269/3 "2020-10-27T16:30:24Z")

</div>

Hello, thanks for posting! Do you mind elaborating on what you’re looking to do? Maybe a code example?

---

<div class="post-metadata">

**Author:** ![aubergine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aubergine/32/123_2.png) [@aubergine](https://forum.builder.io/u/aubergine)\
**Post date:** [November 1, 2020, 5:55pm UTC](https://forum.builder.io/t/references-data-in-builder-component-state/269/4 "2020-11-01T17:55:18Z")

</div>

Sure.  
First of all this is a use case with page generation using Gatsby. 🙂  
I have a Page (let’s call it ParentPage) with a custom field of type List; this list contains References to some entries of any type (eg Page or some Data type). Then I have my imported React component which I’m adding to ParentPage; that component has `builderState` prop available; in this prop I have some ParentPage data; among others there are my defined custom fields, especially my list of References. BUT not `deeply` resolved. I have only reference Id, type and so. (when calling API i have an option includeRefs which gives all data, even what’s inside References, so eg blogPost title etc.)

I did a workaround, dynamically fetching references by given Id 🙂 🤷‍♂️

article(query:  
{  
id: “{’$in’: [list of ids]}”  
}  
)
