# Cannot query field \<ModelName\> on type "builder"

**URL:** <https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654>\
**Category:** Technical Questions\
**Tags:** gatsby, react, api\
**Created:** [January 31, 2022, 4:56pm UTC](https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654 "2022-01-31T16:56:02Z")\
**Posts on this page:** 4\
**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:** [January 31, 2022, 4:56pm UTC](https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654/1 "2022-01-31T16:56:02Z")

</div>

**What are you trying to accomplish**  
I was following [this](https://www.builder.io/c/docs/custom-dropzones) documentation in order for me to get a **custom section model**.

**Screenshots or video link**

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/1/18aa9a94fb3871df648dcdd929ba1be9ace79e88.png)  
Im getting this when I try to query the model I created in builder editor.

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

**Reproducible code example**

this is exactly how my component is setup.

```auto
import React from 'react';
import { graphql } from 'gatsby';
import { BuilderComponent } from '@builder.io/react';

const SiteWideBanner = (props) => {
  const banner = props.data?.allBuilderModels.banner[0];
  const content = banner ? banner.content: {};

  return <BuilderComponent
    content={content}
    model="banner" />
}

export default SiteWideBanner;      

export const bannerQuery = graphql`
  query {
    allBuilderModels {
      banner(target: { urlPath: "/" }) {
        content 
      }
    }
  }
`

```

I do get results for above query when I execute in GraphQL explorer. But Im not sure why I am getting this above mentioned error. I have tried both model names. **oneBanner** and **banner**  
can someone point me what I am doing wrong here?

---

<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:** [January 31, 2022, 7:47pm UTC](https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654/2 "2022-01-31T19:47:13Z")

</div>

Hi @shehan,

Can you try following the suggestions in this [forum post](https://forum.builder.io/t/how-to-setup-gatsby-with-builder-io-newbie/186)? Let me know if this resolves the error you’re seeing.

---

<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, 3:24am UTC](https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654/3 "2022-02-01T03:24:12Z")

</div>

Hi @maddy ,

Thank you for the response. I have tried those but still I get the error. Here is the model setup I have

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

---

<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:42am UTC](https://forum.builder.io/t/cannot-query-field-modelname-on-type-builder/1654/4 "2022-02-01T07:42:32Z")

</div>

After couple of cleaning and restarting finally I was able to build the project.
