Query / get fields created on models

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

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.

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

I tried the below link too.

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

Code stack you are integrating Builder with
Gatsby, React

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.

We also have another forum post with suggestions when new fields aren’t appearing that may be helpful.

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

I cant do the same for banner model.

but there is a property in the model called isActive

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

Hey @maddy

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

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

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

@shehan glad its showing on 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.

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.