DEV Community 👩‍💻👨‍💻

Philipp Jost
Philipp Jost

Posted on

`createSchemaCustomization` duplicates type instead of a merge.

i want to complement my infered types via the createTypes API like so:

exports.createSchemaCustomization = ({ actions }) => {
  const { createTypes } = actions
  const typeDefs = `
    type SiteSiteMetadataSecondaryNavItems implements Node @infer {
      childItems: [SiteSiteMetadataSecondaryNavItemsChildItems]
    type SiteSiteMetadataSecondaryNavItemsChildItems @infer {
      title: String
      icon: String
      href: String

it's very close to the Frontmatter snippet from the docs but i get:

Error: Schema must contain uniquely named types but contains multiple types named "SiteSiteMetadataSecondaryNavItems".

"gatsby": "^2.13.8",

Top comments (0)

🌚 Turn on dark mode

🔠 Change your default font

📚 Adjust your experience level to see more relevant content

Head to your account's Settings to do all this and more.