What are you trying to accomplish
I was following this documentation in order for me to get a custom section model.
Screenshots or video link
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.
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?