Menu

AEM Content Fragment with GraphQL

In this post we will learn AEM content fragment creation with graph ql. In the step by step process we can create an AEM content fragment from scratch and then explore the authored content as an endpoint using GraphQL


1. Go to AEM start > Tools > General > configuration browser

GraphQL with AEM content Fragment step 1


2. Create a config under the folder project folder where you want to create configurations.

Add the title and select teh following checkboxes.

GraphQL with AEM content Fragment step 2

You have done setting your configuration folder.

3. Now, go AEM > tools > Assets > Content fragment model

GraphQL with AEM content Fragment step 3


4. Select your configuration folder, and craete a content fragment model. Open the model and add the elements and set the respective data type. We have created a model here that have one field with data type JSON. 

GraphQL with AEM content Fragment step 4
Save the changes. You have done with the creation of CF model.

5. Now, create content fragment in Assets. for that;

Goto AEM > Assets > and now select the folder where you want to create model. Here we are creating under We.Retail > en > cf directory.

GraphQL with AEM content Fragment step 5

6. We have created a content fragment with name 032025. Open this and add your data. As you an see here we have added a json object here.

GraphQL with AEM content Fragment step 6


Save the content fragment.

7. Now lets expose this content fragmnet in GraphQL. For that we will required create a graph QL endpoint. Go to AEM > Tools > Aseets> graph ql

GraphQL with AEM content Fragment step 7

Here give a name of your endpoint and select the project folder as path.
GraphQL with AEM content Fragment step 7.2


8. Now go to graphql editor to query this CF content. For that go to AEM start > Tools > General > GraphQL query editor or browse http://localhost:4502/aem/graphiql.html

GraphQL with AEM content Fragment step 8


Note: If you are using AEM 6.5 then, this option will not visible to you, and you need to install a package "content fragment with graphql". this package you can download frm software distribution portal.

GraphQL with AEM content Fragment step 8.1

 9. In GraphQL explorer, write a query and select the endpoint in top-right dropdown. This is the same endpoint which we have created in above step 7.
GraphQL with AEM content Fragment step 9
Query 

{

  sdgList { #content fragment name with List 

    items {

      sdgdata #field name from content fragment model

    }

  }

}


References:
 
Want to see a video tutorial on GraphQL and Content Fragment? refer to Adobe official site; Deliver Headless Experiences with Adobe Experience Manager | Adobe Experience Manager
Learn more about the graph ql query adn syntax from official graphql site: https://graphql.org/

JSON data viewer or formatter with Notepadd++

Download this plugin to your local computer: https://sourceforge.net/projects/nppjsonviewer/

Extract this and add a related folder from here to your Notepad++ plugin directory. Generally you will find here in Windows machine: C:\Program Files\Notepad++\plugins or easily go from Notepad++ >> Plugin option




Technology

Technology is the application of scientific knowledge for practical purposes, especially in industry, innovation, and daily life. It encompasses tools, machines, systems, and processes developed to solve problems, enhance human capabilities, and improve efficiency.

Core Categories of Technology

1. Information Technology (IT)

- Deals with computing, data storage, networking, and software.

Includes:

  - Hardware: CPUs, GPUs, storage devices, sensors.

  - Software: Operating systems, apps, APIs.

  - Networking: Internet, cloud computing, data centers.

  - Cybersecurity: Firewalls, encryption, identity management.


2. Artificial Intelligence (AI) & Machine Learning

- Machines simulating human intelligence.

Use cases:

  - Natural language processing (e.g., ChatGPT)

  - Computer vision

  - Predictive analytics

  - Robotics


3. Biotechnology

- Use of living systems and organisms in tech.

Applications:

  - Genetic engineering

  - Pharmaceuticals (mRNA vaccines)

  - Agriculture (GMO crops)


4. Mechanical & Industrial Technology

- Machinery, tools, and systems in manufacturing and engineering.

Includes:

  - Automation

  - Robotics

  - CAD/CAM (Computer-aided design/manufacturing)


5. Electronics & Telecommunications

- Devices and systems for transmitting signals/data.

Examples:

  - Mobile phones

  - Fiber optics

  - 5G networks

  - Satellite communication


6. Automotive & Transportation Technology

- Innovations in mobility and logistics.

Domains:

  - Electric Vehicles (EVs)

  - Self-driving cars

  - Railway and aeronautical systems


7. Energy Technology

- Generating, storing, and using energy efficiently.

Includes:

  - Renewable energy (solar, wind, hydro)

  - Battery tech

  - Smart grids

  - Nuclear energy


8. Nanotechnology

- Manipulating matter at the atomic/molecular scale.

Used in:

  - Electronics

  - Medicine (targeted drug delivery)

  - Materials (stronger, lighter compounds)


Emerging Technologies

  1. Quantum Computing: Solving complex problems exponentially faster 
  2. Blockchain: Secure, decentralized transactions (e.g., Bitcoin, smart contracts)
  3. Augmented/Virtual Reality (AR/VR): Gaming, training, healthcare, education
  4. 3D Printing: Custom manufacturing, prosthetics, aerospace 
  5. Edge Computing: Real-time processing near data sources (IoT, autonomous vehicles)


Role in Society

1. Economic Impact

- Tech drives innovation, productivity, and job creation.

- It powers sectors like fintech, edtech, healthtech, agritech.


2. Healthcare

- Telemedicine, AI diagnostics, wearable devices.

- Robotic surgery, digital health records.


3. Education

- E-learning platforms, smart classrooms, AI tutors.

- MOOCs (Massive Open Online Courses).


4. Governance

- Digital identity (e.g., Aadhaar)

- E-governance platforms

- Smart cities and surveillance


Risks & Ethical Concerns

1. Privacy invasion (e.g., surveillance capitalism)

2. Job displacement due to automation

3. Cybercrime and hacking

4. AI bias and algorithmic discrimination

5. Digital divide (access inequality)


Future of Technology

The future is being shaped by:

1. Sustainable technologies (green computing, circular economy)

2. Human-centric design

3. Interdisciplinary innovation (bioinformatics, neurotech)

4. Regulations and digital ethics frameworks