Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

GraphQL Client

sreedobe
Level 4
Level 4

I have graphQL Services at client place and would like to consume the services using GraphQL Client api provided by adobe, as application is an aem application.

 

I tried by including below maven dependency in core/bundle, ui.apps and parent pom files. I am not able to see GraphQL Factory config or bundle downloaded.

 

I tried both below dependencies with / without scope.

 

<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>

 


<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
<version>1.7.1</version>
</dependency>

 

Thanks,

Sree 

1 Accepted Solution
bilal_ahmad
Correct answer by
Level 5
Level 5

Hey @sreedobe add the dependencies in your budle pom.xml and parent pom.xml. Also add this in your bundle pom.xml in the configuration:

<configuration>
<bnd><![CDATA[
-conditional package: com.adobe.commerce.cif
..
..
]]></bnd>
</configuration>

  

I hope this works out for you!

Thanks,

Bilal.

View solution in original post

2 Replies
bilal_ahmad
Correct answer by
Level 5
Level 5

Hey @sreedobe add the dependencies in your budle pom.xml and parent pom.xml. Also add this in your bundle pom.xml in the configuration:

<configuration>
<bnd><![CDATA[
-conditional package: com.adobe.commerce.cif
..
..
]]></bnd>
</configuration>

  

I hope this works out for you!

Thanks,

Bilal.

View solution in original post

Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @sreedobe,

Adding dependency in POM files will help resolve at AEM maven project level. When the same is deployed in an AEM instance, added dependencies should be available as OSGI bundle. 

In order to do this, in addition to adding desired dependency in parent pom.xml and in core/pom.xml file,

  • If you are using maven-bundle-plugin to build your core module, use below lines in <instructions>
    • <Embed-Dependency>*;inline=true</Embed-Dependency>
      <Embed-Transitive>true</Embed-Transitive>
  • If you are using bnd-maven-plugin to build your core module, use below within <bnd><![CDATA[ section
    • -conditionalpackage : com.adobe.commerce.cif  (desired dependency's groupId and -condiionalpackage without space)