Rich text fields and slice data not showing up

Rich text fields are all null and the slice is empty array. Keytext and non-slice images work fine though.

Here are the details

GraphQL Query

query MyQuery {
  prismicTourInterestForm {
    data {
      age_range {
        age_range_item
      }
      body {
        ... on PrismicTourInterestFormBodyImageGalleryItem {
          id
          primary {
            caption
            image {
              url
              alt
            }
          }
        }
      }
      form_image_1 {
        alt
        url
      }
      form_image_2 {
        alt
        url
      }
      image_gallery_title {
        html
        raw
        text
      }
      title {
        html
        raw
        text
      }
      locations {
        location_name
      }
    }
  }
}

Result

{
  "data": {
    "prismicTourInterestForm": {
      "data": {
        "age_range": [
          {
            "age_range_item": "0-3"
          },
          {
            "age_range_item": "3-5"
          }
        ],
        "body": [],
        "form_image_1": {
          "alt": null,
          "url": "https://images.prismic.io/lineage/5b3e9d06-fa07-4e4b-8a2f-4bdb3ee1db1a_Lineage+3+-+Patmos+Day+1-32.jpg?auto=compress%2Cformat"
        },
        "form_image_2": {
          "alt": null,
          "url": "https://images.prismic.io/lineage/19bf36d8-edb2-4675-9395-166d148ac150_Lineage+3+-+Patmos+Day+1-52.jpg?auto=compress%2Cformat"
        },
        "image_gallery_title": {
          "html": null,
          "raw": null,
          "text": null
        },
        "title": {
          "html": null,
          "raw": null,
          "text": null
        },
        "locations": [
          {
            "location_name": "Christian History of the British Isles (Celtic Church, English and Scottish Reformation and the Mayflower)"
          },
          {
            "location_name": "European Reformation"
          }
        ]
      }
    }
  },
  "extensions": {}
}

Content type

{
  "Main": {
    "title": {
      "type": "StructuredText",
      "config": {
        "single": "heading2",
        "label": "Title",
        "placeholder": "Tour interest form"
      }
    },
    "age_range": {
      "type": "Group",
      "config": {
        "fields": {
          "age_range_item": {
            "type": "Text",
            "config": {
              "label": "Age Range Item"
            }
          }
        },
        "label": "Age Range"
      }
    },
    "locations": {
      "type": "Group",
      "config": {
        "fields": {
          "location_name": {
            "type": "Text",
            "config": {
              "label": "Location Name"
            }
          }
        },
        "label": "Locations"
      }
    },
    "form_image_1": {
      "type": "Image",
      "config": {
        "constraint": {},
        "thumbnails": [],
        "label": "Form Image 1"
      }
    },
    "form_image_2": {
      "type": "Image",
      "config": {
        "constraint": {},
        "thumbnails": [],
        "label": "Form Image 2"
      }
    },
    "image_gallery_title": {
      "type": "StructuredText",
      "config": {
        "single": "heading4",
        "label": "Image Gallery Title"
      }
    },
    "body": {
      "type": "Slices",
      "fieldset": "Slice zone",
      "config": {
        "labels": {},
        "choices": {
          "image_gallery_item": {
            "type": "Slice",
            "fieldset": "Image Gallery Item",
            "description": "Image and Caption for Image Gallery",
            "icon": "insert_photo",
            "non-repeat": {
              "image": {
                "type": "Image",
                "config": {
                  "constraint": {},
                  "thumbnails": [],
                  "label": "Image"
                }
              },
              "caption": {
                "type": "Text",
                "config": {
                  "label": "Caption"
                }
              }
            },
            "repeat": {}
          }
        }
      }
    }
  }
}

Hello @vpul.chaudhary

Thanks for reaching out to us.

What plugins are you using? We support gatsby-source-prismic plugin, and with this plugin, you can retrieve these values text, html, and richText from the Rich Text and Title fields.

I am looking forward to hearing back from you.

Thanks,
Priyanka

Thanks for the response.

We're indeed using 'gatsby-source-prismic'. The queries and results on previous message was from Graphql playground. Here're the actual query we're using on Gatsby:

export const query = graphql`
  {
    allTourInterestForm: allPrismicTourInterestForm {
      nodes {
        data {
          title {
            text
          }
          age_range {
            age_range_item
          }
          locations {
            location_name
          }
          image_gallery_title {
            text
          }
          form_image_1 {
            url
            alt
            fluid(maxWidth: 1200) {
              ...GatsbyPrismicImageFluid
            }
          }
          form_image_2 {
            url
            alt
            fluid(maxWidth: 1200) {
              ...GatsbyPrismicImageFluid
            }
          }
          body {
            ... on PrismicTourInterestFormBodyImageGalleryItem {
              primary {
                image {
                  url
                  alt
                  fluid(maxWidth: 1200) {
                    ...GatsbyPrismicImageFluid
                  }
                }
                caption
              }
            }
          }
        }
      }
    }
  }
`;

Makes no difference though, the rich text is null on both GraphQL playground and Gatsby, and slices empty as well.

@vpul.chaudhary It's strange. Have you published the documents and refreshed the graphql explore?
Can you try also gatsby clean?

@Priyanka Yes, the documents are published. Something weird we noticed was that the GraphQL playground displays the data correctly when the content type is not imported in the gatsby-source-prismic plugin config. But when we import it to the plugin config, both the graphql playground and the query on gatsby have the same issue.

One more thing I forgot to mention is that this problem is only with the newly created content models. All previously created content models are working fine.

Hello @vpul.chaudhary

I need your repo name and project source code(Github repo or Zip) to troubleshoot the issue. You can share via a private message with me.

Thanks,
Priyanka