gatsby-source-sanity icon indicating copy to clipboard operation
gatsby-source-sanity copied to clipboard

Crash if naming a Sanity schema type "imageAsset"/"fileAsset"

Open rexxars opened this issue 4 years ago • 0 comments

If you make the following schema type:

{
  "name": "imageAsset",
  "type": "image",
  "fields": [{
    "name": "alt",
    "type": "string"
  }]
}

...it will be prefixed with Sanity when rewriting it to Gatsby schema, which collides with our default SanityImageAsset (sanity.imageAsset) type. I imagine the same goes for any other sanity-internal types.

rexxars avatar Apr 16 '20 23:04 rexxars