Graphql: I cannot fetch tabs with customized "body" node name

Hello,

In the custom type (called "Home") that I'm buiding, the first and default tab is scoped with a node called "body" by default, in the JSON and I successfully manage to fetch it via graphql

{
  allHomes {
    edges {
      node {
        _linkType
        body {
          __typename
        }
      }
    }
  }
}

When I rename this "body" node into "bodyMain", I can't manage to fetch it via grapghql anymore.

{
  allHomes {
    edges {
      node {
        _linkType
        bodyMain {
          __typename
        }
      }
    }
  }
}

I get this error :

Cannot query field 'bodyMain' on type 'Home'. Did you mean 'body'? (line 8, column 9):\n bodyMain {\n ^

Please help me customize the name of these tab nodes

Hello @prx

Welcome to the Prismic community and thanks for reaching out to us.

It should work if you change from body to body1. When you change the name, you need to add content and publish them again. After publishing the documents again, go to the graphql browser again and refresh and restart.

I hope it works.

Thanks,
Priyanka

Hi Priyanka

Thank you for your help !

Just to be very precise because I spent hours wondering why it was not working : do you mean that I can only append digits and not letters ?

Thabk you !

P

Hi @prx

You can surely add letters in Snake case (body_main) or just simple small letters (bodymain) but not in camelCase(bodyMain). It will work.

Thanks,
Priyanka

Thanks a lot Priyanka !