- Issue created by @slv_
- πΊπΈUnited States apmsooner
Theres a custom normalizer that extends FieldItemNormalizer but I didn't override the denormalize function so assuming thats the issue if you want to take a look and offer a solution: https://git.drupalcode.org/project/custom_field/-/blob/2.0.x/src/Normali...
- πΊπΈUnited States apmsooner
Also noting theres a custom data type that handles the setValue() function. I'm honestly not real familiar with posting data via jsonapi but maybe this would serve some additional reference on how to structure: https://git.drupalcode.org/project/custom_field/-/blob/2.0.x/src/Plugin/...
- πͺπΈSpain slv_
Thanks! I've kept digging into it and found some workarounds. I'll update this once I've a clean version, as there were other issues I faced with the module for my use case. Not sure if it'll be generic enough to be a valid patch for the module, but at least it may serve to enrich documentation and give some guidance for others.
- Status changed to Postponed
9 months ago 11:54pm 14 March 2024 - πΊπΈUnited States apmsooner
Putting this on hold. There are some limitations in general with the JSON:API specification that likely just won't work without some support in Core to be able to extend field item normalizers to get relations at top level of field and to support meta in the relationships for identifying our sub-field properties. There's probably not a whole lot of core interest in accommodating some of these changes given the existing field paradigm and thus lack of understanding around the benefits of this module. Focusing on the GraphQL support task ( https://www.drupal.org/project/custom_field/issues/3423901 β¨ GraphQL Compose plugins integration Active ) is better use of time at this point.
- Status changed to Closed: works as designed
8 months ago 7:48pm 26 March 2024 - πΊπΈUnited States apmsooner
Can't fix this due to limitation with jsonapi spec requiring relationships at field level vs. property level. If someone needs this, the best solution is to either create a custom normalizer for your needs or a jsonapi enhancer to apply via jsonapi_extras module.