# Query / get fields created on models

**URL:** <https://forum.builder.io/t/query-get-fields-created-on-models/1663>\
**Category:** Technical Questions\
**Tags:** visual-editor, gatsby, react, api\
**Created:** [February 1, 2022, 10:10am UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663 "2022-02-01T10:10:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shehan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/shehan/32/1005_2.png) [@shehan](https://forum.builder.io/u/shehan)\
**Post date:** [February 1, 2022, 10:10am UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/1 "2022-02-01T10:10:29Z")

</div>

**What are you trying to accomplish**  
I have a model with the following additional field added.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/7/756ab8321973c6c57945bd739f7c977cff259825.png)

But I am not able to get the field from the content object. But according to this Gatsby example these additional fields should be in the `content.data` object.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/f/f6103bca1c941df79c0864b41449f82604cc1306.png)

I tried with the GraphQL explorer as well. But this custom data field is not accessible from there as well.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/a/acb0814267d7dd8f979c896841130dbbb2c17e84.png)

I tried the below link too.

> **[Custom fields in Builder.io - Builder.io](https://www.builder.io/c/docs/custom-fields)**
>
> Build and optimize digital experiences for any tech stack, visually.

what is the best way to get these custom fields into code.

**Code stack you are integrating Builder with**  
Gatsby, React

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [February 1, 2022, 5:16pm UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/2 "2022-02-01T17:16:03Z")

</div>

Hi @shehan!

I opened the GraphQL Explorer in your space but noticed the fields in the banner model were deleted and there isn’t any content created, so I’m unable to test this on my end. I was able to query the custom fields on your page model though below. If you add the custom fields back to the banner model, I’d be happy to investigate further on why the fields weren’t showing.

 ![Screen Shot 2022-02-01 at 11.45.48 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/c/c8e0ad0c683792bfa81893a346b40d4817a3bc77.jpeg)

We also have another [forum post](https://forum.builder.io/t/new-field-not-appearing-in-graphql/938) with suggestions when new fields aren’t appearing that may be helpful.

---

<div class="post-metadata">

**Author:** ![shehan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/shehan/32/1005_2.png) [@shehan](https://forum.builder.io/u/shehan)\
**Post date:** [February 1, 2022, 7:45pm UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/3 "2022-02-01T19:45:09Z")

</div>

Hi @maddy ,

Thank you for the response. But that is not the space that Im currently working on. I can share the public api key if you want.

In that space currently I have created a model called `banner` and that has a custom field name `isActive`. Although now I can query custom fields of `page` model like so

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/0/0422ab1c137c69238a61164bf5592dce6d5328fb.png)

I cant do the same for `banner` model.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/f/f77319761fe4d06e80ccfd409fcba072ee8994d5.png)

but there is a property in the model called `isActive`

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/d/de8c8612f4cd50707660fdd343ba8cb28f2bf56b.png)

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [February 1, 2022, 8:05pm UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/5 "2022-02-01T20:05:06Z")

</div>

@shehan Thanks for those details, can you share the public API key of the correct space so I can take a look?

---

<div class="post-metadata">

**Author:** ![shehan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/shehan/32/1005_2.png) [@shehan](https://forum.builder.io/u/shehan)\
**Post date:** [February 2, 2022, 4:01am UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/6 "2022-02-02T04:01:20Z")

</div>

Hey @maddy

Here is the key `fa90c351c2f1400391ef7369eb8a8c9e`.  
I checked right now and I can get the value from builder graphql explorer

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/3/3c92fabdbcb6cccb137ad77f14ff4f5bc9471958.png)

but when I checked localhost graphql explorer the property does not exist.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/3/3046af92afc2d76f371af5ef29a334c8a4771c86.png)

And when I used it in code also the build gets failed.

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [February 2, 2022, 5:44pm UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/7 "2022-02-02T17:44:34Z")

</div>

@shehan glad its showing on [https://builder.io/graphql-explorer](https://builder.io/graphql-explorer) now! Could you try stopping the development server, running `gatsby clean`, and then start the development server again? Let me know if this works.

---

<div class="post-metadata">

**Author:** ![shehan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/shehan/32/1005_2.png) [@shehan](https://forum.builder.io/u/shehan)\
**Post date:** [February 4, 2022, 2:23pm UTC](https://forum.builder.io/t/query-get-fields-created-on-models/1663/8 "2022-02-04T14:23:12Z")

</div>

Yea after couple of times running gatsby clean and starting the server it worked. Im not sure whats causing this delay. In a production environment this would be a something annoying.
