Investigating
Enable Programmatic Extension of Content Fragment GraphQL Schema in AEM
| Request for Feature Enhancement (RFE) Summary: | Enable the ability to add custom fields to the Content Fragment GraphQL schema via code, SlingDataFetcher, or programmatic means, without requiring changes to the Content Fragment Model definition in AEM. |
| Use-case: | Developers and integrators need to expose computed, derived, or integration-specific fields in the Content Fragment GraphQL API for headless delivery, without modifying the underlying Content Fragment Model. |
| Current/Experienced Behavior: | The Content Fragment GraphQL schema is auto-generated from the Content Fragment Model and system fields. It is not possible to add custom fields via code, SlingDataFetcher, or other programmatic approaches. |
| Business Impact | Limits flexibility for headless integrations, increases maintenance overhead, and requires model changes for every new field, which may not be feasible or desirable in large organizations or for computed/integration fields. |
| Improved/Expected Behavior: | Ability to programmatically extend the Content Fragment GraphQL schema with custom fields (e.g., via SlingDataFetcher or similar mechanism), allowing dynamic, computed, or integration fields to be exposed without model changes. |
| Environment Details (AEM version/service pack, any other specifics if applicable): | AEM 6.5 LTS; Content Fragment Models and GraphQL API; persisted queries; endpoints as described above. |
| Customer-name/Organization name: | JPMorgan Chase |
| Code package (if applicable): | https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-expose-a-custom-resolver-field-in-content-fragments-for/m-p/776485 . I have added the code here |