GraphQL Query for UUID in AEM 6.5 | Community
Skip to main content
New Participant
September 30, 2024
Solved

GraphQL Query for UUID in AEM 6.5

  • September 30, 2024
  • 4 replies
  • 974 views

Hi,

 

How to retrieve jcr:uuid from a Content Fragment base path in a Graph QL query. We are using AEM 6.5 with service pack 6.5.17.

 

Thanks,

Divya

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MukeshYadav_

Hi @divyat3 ,

Seems we are not able to access jcr:uuid with GraphQL

We may try to generate unique id as workaround https://www.linkedin.com/pulse/custom-datatype-content-fragments-model-cfm-aem-generate-ankur-garg/

Not sure if it satisfy yours use case.

Thanks

4 replies

kautuk_sahni
Employee
October 9, 2024

@divyat3 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
h_kataria
New Participant
October 1, 2024

If it is not a strict requirement then you can possibly use _path parameter as unique identifier in your queries. It will return the CF path which should be unique in each case.
In case variations are involved then consuming application can use both _path and  _variation param to create a unique identifier. 
Hope this helps.


khamat_bn
New Participant
October 1, 2024

Hi @divyat3 ,

 

AEM GraphQL is querying the data exposed by Content Fragment models and CF models is not exposing the jcr:uuid directly. In Order to do we need to modify the CF model implementation and the specific property like jcr:uuid so that it will be available and GraphQL can use it . 

~Bhausaheb

 

MukeshYadav_
MukeshYadav_Accepted solution
New Participant
September 30, 2024

Hi @divyat3 ,

Seems we are not able to access jcr:uuid with GraphQL

We may try to generate unique id as workaround https://www.linkedin.com/pulse/custom-datatype-content-fragments-model-cfm-aem-generate-ankur-garg/

Not sure if it satisfy yours use case.

Thanks

DivyaT3Author
New Participant
October 3, 2024

sure @mukeshyadav_ .we'll try this. Thank you.