hygraph / management-sdk

Hygraph Management SDK
MIT License
48 stars 17 forks source link

slug generation #14

Open caburgoin opened 2 years ago

caburgoin commented 2 years ago

I noticed that from the management sdk it is not possible or at least not documented on how to treat a slug type so that it generates the slug based on other field. e.g: generate slug based on post id or name

nrandell commented 2 years ago

I've been trying to use

formConfig: {
    config: {
      isLowercase: true,
      shouldGenerateAutomatically: true,
      automaticSlug: "{title}",
    },
  },

in add simple field. The field gets added, but the automatic slug generation is not working!

notrab commented 2 years ago

Hey @nrandell the automatic slug "content" generation is UI based only. It would be great for us to support this at an API level too.

joelpierre commented 2 years ago

👍🏽

roman-contino commented 2 years ago

I'd love to see this in the SDK!