We have been following the Magento GraphQl developments to see what impacts and expectations this would create for our extensions. In a PWA environment we anticipate everything to be provided via a GraphQl request and this extends to extensions as well. Below is a list of my current thoughts on how this would impact our extensions and what our plans are. We will follow the standard set by Magento creating a separate package for the GraphQl functionality (Fooman_ExtensionName + GraphQl).

Email Attachments

No frontend facing elements so no GraphQl module needed

Print Order Pdf

Currently no frontend facing elements so no GraphQl module needed

Pdf Customiser

We are currently awaiting delivery of Magento Core functionality to display detailed order information in Magento_SalesGraphQl (likely in 2.3.4). Once this is available we will add a resolver to query for the content as a pdf

type CustomerOrder {
    [...]
    fooman_pdf: FoomanPdf! @resolver(class: "\\Fooman\\PdfCustomiserGraphQl\\Model\\Resolver\\OrderPdf")
}
type FoomanPdf @doc(description: "FoomanPdf provides pdf content of the related entity.") {
    filename: String @doc(description: "File name of the pdf")
    content_base64: String @doc(description: "Pdf content base64 encoded")
}
Pdf Quote

We are planning to add a new resolver to the Cart query type of the Magento_QuoteGraphQl module

type Cart {
    [...]
    fooman_pdf: FoomanPdf! @resolver(class: "\\Fooman\\PdfPrintQuoteQl\\Model\\Resolver\\Pdf")
}

type FoomanPdf @doc(description: "FoomanPdf provides pdf content of the related entity.") {
    filename: String @doc(description: "File name of the pdf")
    content_base64: String @doc(description: "Pdf content base64 encoded")
}
Pdf Pickinglist

Currently no frontend facing elements so no GraphQl module needed

Connect Xero

Currently no frontend facing elements so no GraphQl module needed

SameOrderInvoice Number

The order/invoice/shipment/creditmemo numbers will already be displayed via Magento_SalesGraphQl so no extra GraphQl module needed

GoogleAnalytics+

At this stage I envisage that this module is obsolete in a PWA environment as I believe some React google analytics component will be included. I currently think it's likely that the main functionality (sending the individual steps of the checkout) will already be sorted by the solution included in PWA Studio.

Order Manager

Currently no frontend facing elements so no GraphQl module needed

Order Number Customiser

The order/invoice/shipment/creditmemo numbers will already be displayed via Magento_SalesGraphQl so no extra GraphQl module needed

All our surcharge extensions

Payment Surcharge, Small Order Fee, Product Surcharge, Shipment Surcharge
We are planning to add a new resolver to the CartPrices query type of the Magento_QuoteGraphQl module


type CartPrices {
    [...]
    fooman_applied_surcharges: [FoomanSurcharge] @doc(description:"An array of applied surcharges") @resolver(class: "\\Fooman\\SurchargeGraphQl\\Model\\Resolver\\Surcharge")
}

type FoomanSurcharge @doc(description:"Defines an individual surcharge.") {
    amount: Money! @doc(description:"The amount of the surcharge")
    label: String! @doc(description:"The label of the surcharge")
}

Once Magento Core functionality is released to display detailed order information in Magento_SalesGraphQl (likely in 2.3.4) we will expand the above to cover those as well.

Suggestions or Requests?

I generally do not publish our roadmap, as it is quite changeable, but felt the GraphQl ideas could use some public scrutiny. Have you worked with Magento GraphQl before and are using our extensions? Anything you wish that we do that is missing from the above?

Kristof Ringleff

Kristof Ringleff

Founder and Lead Developer at Fooman

Want to receive our monthly email with the best Magento developer tips, tricks and news? Join 7000+ other Magento developers