sanity-typed-queries icon indicating copy to clipboard operation
sanity-typed-queries copied to clipboard

feat: add support for fieldsets

Open waspeer opened this issue 4 years ago • 1 comments

🆒 Your use case It would be nice to be able to add fields to a fieldset (https://www.sanity.io/docs/object-type#fieldsets-AbjN0ykp).

🆕 The solution you'd like A intuitive solution would be something like this:

defineObject(
  'something',
  {
    fieldset: {
      field: { type: 'string' },
      anotherField: { type: 'date' },
    },
  },
);

🔍 Alternatives you've considered A possible alternative could be to manually edit the generated object / document, but this is of course far from ideal.

waspeer avatar Nov 05 '20 19:11 waspeer

Btw, I'd be happy to contribute when we figure out the right api

waspeer avatar Nov 06 '20 17:11 waspeer