Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

GraphQL Client

Avatar

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

Avatar

Correct answer by
Community Advisor

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

Avatar

Correct answer by
Community Advisor

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.

Avatar

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)