adaptTo2020-GraphQL-services-in-the-AEM-world-Markus Haack-Mark-J-Becker
adaptTo2020-GraphQL-services-in-the-AEM-world-Markus Haack-Mark-J-Becker
2
Agenda
4
Why GraphQL in AEM projects?
5
Commerce Core Components
6
Commerce Integration Framework (CIF)
CIF = +
7
Commerce Core Components
§ GraphQL client linked to AEM site via Sling Context Aware Configuration
§ Flexible mappings & combinations of AEM site (using MSM) to multiple Magento stores
§ CIF Extras:
§ AEM page templates commerce page types
§ SEO helpers for commerce pages
8
Commerce Core Components & GraphQL usage
AEM
Specific to
GraphQL data models Magento Schema
9
Demo
Commerce Core Component Library
10
Server-side GraphQL
12
GraphQL client for all
13
Usage of GraphQL client
14
Usage of GraphQL client
15
Usage of GraphQL client
16
Client-Side GraphQL
18
Client-Side GraphQL
19
Declarative Data Fetching
20
Customization with React Context
§ Composition
§ Encapsulate component logic in re-useable
context
const App = () => (
<CartContext>
<MyCart />
</CartContext>);
// MyCart
const [products, { add, remove }] = useCartContext();
21
Demo
React Component Customization
22
GraphQL Integration Layer
24
Serverless GraphQL Server
L Commerce
GraphQ
t {
product { produc e
name nam Engine
inventory { }
location
Dispatcher
} Loader
}
Query
inv
ent
or
} loc y {
Loader ati
on
26
Q&A
27
References
§ CIF Core Components
https://github.com/adobe/aem-core-cif-components
§ CIF GraphQL Client
https://github.com/adobe/commerce-cif-graphql-client
§ Magento GraphQL data models and query builders
https://github.com/adobe/commerce-cif-magento-graphql
§ GraphQL Java Generator
https://github.com/adobe/graphql-java-generator
§ GraphQL Reference Implementation
https://github.com/adobe/commerce-cif-graphql-integration-reference
§ Venia Reference
https://github.com/adobe/aem-cif-guides-venia
§ Magento GraphQL Schema
https://devdocs.magento.com/guides/v2.4/graphql/
§ Serverless GraphQL on Adobe I/O Runtime (Medium)
https://medium.com/adobetech/serverless-graphql-on-adobe-i-o-runtime-e221d2a8e215
28