SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
Bartosz Herba | Divante Senior Developer
GraphQL
are you sure you know when to use it?
Let’s talk about
eCommerce
Hi, my name is Bartosz Herba
I am a Magento 2 developer with a few years of experience in working on
e-commerce solutions
email: bherba@divante.co
mobile: +48 662 093 917
What is a GraphQL?
What is a GraphQL
● Invented and used by Facebook since 2012 to speed up
communication with a facebook API for a different kind of
devices.
● GraphQL is an Alternative, Elastic, Resource Effective,
Centralized and Strongly Typed way of a communication with
an API
What is a GraphQL?
Alternative
● Does not replace REST or SOAP in the “way” of communication with an API,
just gives another tool to achieve similar goal.
● Brings new structured approach of how we ask for a required resources
What is a GraphQL?
Alternative
Query Body Response
Endpoint Url
What is a GraphQL?
Elastic and Resource Effective
● You don’t have to ask for everything but exactly and only what you need
● Therefore requests and responses are lightweight because only necessary data are
transferred
● No more of under/over fetching problems
What is a GraphQL?
Elastic and Resource Effective
{"id":1,"sku":"simple_sku","name":"Test
Simple","attribute_set_id":4,"price":119,"status":1,"visibility":4,"type_id":"simple","created_at":"2019-09-19
10:02:25","updated_at":"2019-09-19
10:02:25","extension_attributes":{"website_ids":[1],"stock_item":{"item_id":1,"product_id":1,"stock_id":1,"qty":12,"is_in_stock":true,"i
s_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1
,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":true,"backorders":0,"use_config_
notify_stock_qty":true,"notify_stock_qty":1,"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true,"
enable_qty_increments":false,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":null,"is_decimal_divided":fals
e,"stock_status_changed_auto":0}},"product_links":[],"options":[],"media_gallery_entries":[],"tier_prices":[],"custom_attributes":[{"attri
bute_code":"pimcore_id","value":"0"},{"attribute_code":"is_active_in_pim","value":"0"},{"attribute_code":"options_container","value":
"container2"},{"attribute_code":"msrp_display_actual_price_type","value":"0"},{"attribute_code":"url_key","value":"test-simple"},{"attr
ibute_code":"gift_message_available","value":"2"},{"attribute_code":"required_options","value":"0"},{"attribute_code":"has_options",
"value":"0"},{"attribute_code":"meta_title","value":"Test Simple"},{"attribute_code":"meta_keyword","value":"Test
Simple"},{"attribute_code":"meta_description","value":"Test Simple
"},{"attribute_code":"tax_class_id","value":"2"},{"attribute_code":"category_ids","value":[]}]}
Rest - simplest possible response is full of unnecessary data
What is a GraphQL?
Elastic and Resource Effective
{
"data": {
"products": {
"items": [
{
"price": {
"regularPrice": {
"amount": {
"value": 119
}
}
},
"sku": "simple_sku",
"name": "Test Simple",
"image": {
"label": "Test Simple"
...
GraphQL - you get exactly what you want and nothing more
What is a GraphQL?
Elastic and Resource Effective
155
1600
What is a GraphQL?
Centralized
● There is just one endpoint for any request
● Difference is in request’s body structure
● It means that you can prepare just a single request instead of
many to get all necessary data for a view
REST ApiGraphQL Api
What is a GraphQL?
Centralized
/graphql
/products /cms /customer
What is a GraphQL?
Strongly Typed
● The most basic components of a GraphQL schema are object types, which just
represent a kind of object you can fetch from your service, and what fields it has.
● Every field on a GraphQL object type can have zero or more arguments
● A GraphQL object type has a name and fields, but at some point those fields
have to resolve to some concrete data. That's where the scalar types come in: they
represent the leaves of the query.
● Scalars, enums, lists, interfaces
● We always know what to expect.
What is a GraphQL?
When to use it?
● Building an API for different devices
● Building an open API
● Working with Model-View layers
● Working with multiple-resources-at-a-time scenarios
What is a GraphQL?
When not to use it?
● I would not recommend to use it with ERP integrations
● But, to be frankly, it is hard to give a general and true statement on such a
topic
What is a GraphQL?
GraphQL in Magento
Available from 2.3.x
Main target is PWA
What is a GraphQL?
GraphQL in Magento - coverage
● module-catalog-graph-ql
● module-bundle-graph-ql
● module-catalog-inventory-graph-ql
● module-catalog-url-rewrite-graph-ql
● module-cms-graph-ql
● module-configurable-product-graph-ql
● module-customer-graph-ql
● module-directory-graph-ql
● module-downloadable-graph-ql
● module-eav-graph-ql
● module-grouped-product-graph-ql
● module-inventory-graph-ql
● module-quote-graph-ql
● module-sales-graph-ql
● module-send-friend-graph-ql
● module-store-graph-ql
● module-swatches-graph-ql
● module-tax-graph-ql
● module-theme-graph-ql
● module-url-rewrite-graph-ql
● module-vault-graph-ql
● module-wee-graph-ql
● module-wishlist-graph-ql
LEARN MORE AT
DIVANTE.COM/BLOG

Contenu connexe

Plus de Divante

UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2
Divante
 

Plus de Divante (20)

How to create a Vue Storefront theme
How to create a Vue Storefront themeHow to create a Vue Storefront theme
How to create a Vue Storefront theme
 
Game changer for e-commerce - Vue Storefront - open source pwa
Game changer for e-commerce - Vue Storefront - open source pwa Game changer for e-commerce - Vue Storefront - open source pwa
Game changer for e-commerce - Vue Storefront - open source pwa
 
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speechVue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
Vue Storefront - Progressive Web App for Magento (1.9, 2.x) - MM18DE speech
 
How to successfully onboard end-clients to a B2B Platform - Magento Imagine ...
How to successfully onboard  end-clients to a B2B Platform - Magento Imagine ...How to successfully onboard  end-clients to a B2B Platform - Magento Imagine ...
How to successfully onboard end-clients to a B2B Platform - Magento Imagine ...
 
eCommerce trends from 2017 to 2018 by Divante.co
eCommerce trends from 2017 to 2018 by Divante.coeCommerce trends from 2017 to 2018 by Divante.co
eCommerce trends from 2017 to 2018 by Divante.co
 
Designing for PWA (Progressive Web Apps)
Designing for PWA (Progressive Web Apps)Designing for PWA (Progressive Web Apps)
Designing for PWA (Progressive Web Apps)
 
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenariosWhy is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenarios
 
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationvue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
 
Pimcore Overview - Pimcore5
Pimcore Overview - Pimcore5Pimcore Overview - Pimcore5
Pimcore Overview - Pimcore5
 
Pimcore E-Commerce Framework - Pimcore5
Pimcore E-Commerce Framework - Pimcore5Pimcore E-Commerce Framework - Pimcore5
Pimcore E-Commerce Framework - Pimcore5
 
The biggest stores on Magento
The biggest stores on MagentoThe biggest stores on Magento
The biggest stores on Magento
 
B2B Commerce - how to become successful
B2B Commerce - how to become successfulB2B Commerce - how to become successful
B2B Commerce - how to become successful
 
Budgeting in SCRUM by Divante
Budgeting in SCRUM by DivanteBudgeting in SCRUM by Divante
Budgeting in SCRUM by Divante
 
Omnichannel B2B Architecture
Omnichannel B2B ArchitectureOmnichannel B2B Architecture
Omnichannel B2B Architecture
 
UX for eCommerce Fashion
UX for eCommerce FashionUX for eCommerce Fashion
UX for eCommerce Fashion
 
Microservices Architecture for e-Commerce
Microservices Architecture for e-CommerceMicroservices Architecture for e-Commerce
Microservices Architecture for e-Commerce
 
UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2UI elements in Magento 1.9 and 2
UI elements in Magento 1.9 and 2
 
Pimcore - Presentation
Pimcore - PresentationPimcore - Presentation
Pimcore - Presentation
 
Divante eCommerce Design Studio
Divante eCommerce Design StudioDivante eCommerce Design Studio
Divante eCommerce Design Studio
 
Pimcore - Content Management System and PIM
Pimcore  - Content Management System and PIMPimcore  - Content Management System and PIM
Pimcore - Content Management System and PIM
 

Dernier

( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
nilamkumrai
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 

Dernier (20)

( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 

GraphQL are you sure you know when to use it?

  • 1. Bartosz Herba | Divante Senior Developer GraphQL are you sure you know when to use it?
  • 2. Let’s talk about eCommerce Hi, my name is Bartosz Herba I am a Magento 2 developer with a few years of experience in working on e-commerce solutions email: bherba@divante.co mobile: +48 662 093 917
  • 3. What is a GraphQL? What is a GraphQL ● Invented and used by Facebook since 2012 to speed up communication with a facebook API for a different kind of devices. ● GraphQL is an Alternative, Elastic, Resource Effective, Centralized and Strongly Typed way of a communication with an API
  • 4. What is a GraphQL? Alternative ● Does not replace REST or SOAP in the “way” of communication with an API, just gives another tool to achieve similar goal. ● Brings new structured approach of how we ask for a required resources
  • 5. What is a GraphQL? Alternative Query Body Response Endpoint Url
  • 6. What is a GraphQL? Elastic and Resource Effective ● You don’t have to ask for everything but exactly and only what you need ● Therefore requests and responses are lightweight because only necessary data are transferred ● No more of under/over fetching problems
  • 7. What is a GraphQL? Elastic and Resource Effective {"id":1,"sku":"simple_sku","name":"Test Simple","attribute_set_id":4,"price":119,"status":1,"visibility":4,"type_id":"simple","created_at":"2019-09-19 10:02:25","updated_at":"2019-09-19 10:02:25","extension_attributes":{"website_ids":[1],"stock_item":{"item_id":1,"product_id":1,"stock_id":1,"qty":12,"is_in_stock":true,"i s_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1 ,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":true,"backorders":0,"use_config_ notify_stock_qty":true,"notify_stock_qty":1,"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true," enable_qty_increments":false,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":null,"is_decimal_divided":fals e,"stock_status_changed_auto":0}},"product_links":[],"options":[],"media_gallery_entries":[],"tier_prices":[],"custom_attributes":[{"attri bute_code":"pimcore_id","value":"0"},{"attribute_code":"is_active_in_pim","value":"0"},{"attribute_code":"options_container","value": "container2"},{"attribute_code":"msrp_display_actual_price_type","value":"0"},{"attribute_code":"url_key","value":"test-simple"},{"attr ibute_code":"gift_message_available","value":"2"},{"attribute_code":"required_options","value":"0"},{"attribute_code":"has_options", "value":"0"},{"attribute_code":"meta_title","value":"Test Simple"},{"attribute_code":"meta_keyword","value":"Test Simple"},{"attribute_code":"meta_description","value":"Test Simple "},{"attribute_code":"tax_class_id","value":"2"},{"attribute_code":"category_ids","value":[]}]} Rest - simplest possible response is full of unnecessary data
  • 8. What is a GraphQL? Elastic and Resource Effective { "data": { "products": { "items": [ { "price": { "regularPrice": { "amount": { "value": 119 } } }, "sku": "simple_sku", "name": "Test Simple", "image": { "label": "Test Simple" ... GraphQL - you get exactly what you want and nothing more
  • 9. What is a GraphQL? Elastic and Resource Effective 155 1600
  • 10. What is a GraphQL? Centralized ● There is just one endpoint for any request ● Difference is in request’s body structure ● It means that you can prepare just a single request instead of many to get all necessary data for a view
  • 11. REST ApiGraphQL Api What is a GraphQL? Centralized /graphql /products /cms /customer
  • 12. What is a GraphQL? Strongly Typed ● The most basic components of a GraphQL schema are object types, which just represent a kind of object you can fetch from your service, and what fields it has. ● Every field on a GraphQL object type can have zero or more arguments ● A GraphQL object type has a name and fields, but at some point those fields have to resolve to some concrete data. That's where the scalar types come in: they represent the leaves of the query. ● Scalars, enums, lists, interfaces ● We always know what to expect.
  • 13. What is a GraphQL? When to use it? ● Building an API for different devices ● Building an open API ● Working with Model-View layers ● Working with multiple-resources-at-a-time scenarios
  • 14. What is a GraphQL? When not to use it? ● I would not recommend to use it with ERP integrations ● But, to be frankly, it is hard to give a general and true statement on such a topic
  • 15. What is a GraphQL? GraphQL in Magento Available from 2.3.x Main target is PWA
  • 16. What is a GraphQL? GraphQL in Magento - coverage ● module-catalog-graph-ql ● module-bundle-graph-ql ● module-catalog-inventory-graph-ql ● module-catalog-url-rewrite-graph-ql ● module-cms-graph-ql ● module-configurable-product-graph-ql ● module-customer-graph-ql ● module-directory-graph-ql ● module-downloadable-graph-ql ● module-eav-graph-ql ● module-grouped-product-graph-ql ● module-inventory-graph-ql ● module-quote-graph-ql ● module-sales-graph-ql ● module-send-friend-graph-ql ● module-store-graph-ql ● module-swatches-graph-ql ● module-tax-graph-ql ● module-theme-graph-ql ● module-url-rewrite-graph-ql ● module-vault-graph-ql ● module-wee-graph-ql ● module-wishlist-graph-ql