Winter is just around the corner, so as you already know, it’s almost time for the Winter’23 Release! Salesforce brought us features that make Lightning Components and Flows even more powerful. In addition, Salesforce has invested in making the platform even more scalable. This is mainly the general release of the API: the GraphQL API that became available since the Summer’22 Release! I’ll be sharing the details about these new features in this article. Are you ready?
The Salesforce Winter’23 Release becomes generally available on October 17th. The following images in this article belong to the Salesforce official “Developer Preview: Winter’23 Release Readiness Live” presentation, on September 22nd, except when noted otherwise. Below, find the table of contents for this article:
- GraphQL API is now becoming generally available across Salesforce
- Querying records with Flow is getting much more powerful!
- New Data Table (Beta) and Lookup components for Screen Flows
- Embed Screen Flow into Lightning Web Components
1. GraphQL API is now becoming generally available across Salesforce
For those who never heard about it, GraphQL is an open-source data query and manipulation language API that gives clients the power to ask for exactly what they need and nothing more. Apps using GraphQL are fast and stable because they control the data they get, not the server. For more information, their official website provides compelling examples and further documentation.
“I already use their REST APIs; why bother with GraphQL API?” some might question. Let me answer this with an example.
Let’s say you make a call to a traditional REST API, and your use case is looking up a contact’s e-mail address. With REST API, you’ll most likely make a call to an endpoint that gives you all the data you have permission to access about that contact record. So, rather than just retrieving a contact’s e-mail address, you’ll also receive their address, their manager’s name, etc. In short, everything returned to you that isn’t the contact’s e-mail address is wasted data — an unnecessary cost to both the server and you.
You even could use parameters on every REST endpoint to prevent this problem of over fetching data with REST APIs. Still, since there aren’t widely adopted standards for this, this could work in the application you’re developing, but not only does it imply development costs and some commitment to the limits that the technology itself has, but there is also no guarantee that, when trying to communicate with another application, the developer has bothered to adopt some methodology to filter the data.
A GraphQL API solves this problem by allowing for resource aggregation, or in other words, the ability to retrieve all the data your app needs in just one request. With the new Salesforce GraphQL API, there is a wide range of benefits for Salesforce developers, including:
- Field selection
- Resource aggregation
- Schema introspection
- sObject queryability
You can request their related records, filter with data by the record itself or from associated records, do semi-join or anti-join and much more!
Here are some examples of fetching data from Salesforce using the GraphQL API:
For now, it’s only possible to read/consume data, but in future releases, they’re planning to provide create and update record capabilities using this technology.
They are also planning on bringing a wire adapter for Lightning Web Components that will allow developers to query GraphQL right from the component JavaScript module! Isn’t it amazing?
After the presentation of Sudva Myagmar, the Product Manager for the Lightning Data Service at Salesforce, good and shocking news is coming for us. There are many possibilities to improve performance and have optimised integrations with Salesforce!
I suggest you check the official Salesforce documentation about their GraphQL API implementation for more information official Salesforce documentation about their GraphQL API implementation. Also, an official article in the release notes is available here.
2. Querying records with Flow is getting much more powerful!
San Reynard, Product Manager for Screen Flows at Salesforce, presented the flow features.
If you have been working with Salesforce flows for a while, it is likely that you would have gone through the pain of using the “Get Records” element in the Loops.
Let’s suppose you want to fetch accounts and their related contact records. Up until now, using only out-of-the-box flow elements, you’d need to do something like this:
If the Account query returned more than 200 records, we certainly would hit the SOQL governor limit.
However, when using Apex to do the same thing, it would have been simple as shown below:
Map<Id, Account> Map_Accounts_DB = new Map<Id, Account>([SELECT Id, Name, CreatedDate FROM Account WHERE CreatedDate = TODAY]); List<Contact> RelatedContacts_DB = [SELECT Id, AccountId, LastName, MailingCity FROM Contact WHERE AccountId IN :Map_Accounts_DB.keySet()];
Fortunately, with Winter’23 Release, two new operators will be available for the “Get” element: “IN” and “NOT IN”. Now there’ll be no excuses to avoid queries inside loops. 🙂
More information about this feature can be found in the official release notes article.
3. New Data Table (Beta) and Lookup components for Screen Flows
The Winter’23 Release will bring significant enhancements to the Screen Flow Runtime. There’ll be two new components that will give even more power to screen flow builders:
The “Lookup” flow screen component will support multiple selections! You can specify a selection maximum and one or more default records.
Also, Salesforce will introduce a brand-new component: a long-awaited out-of-the-box “data-table” flow screen component! This will be available as a beta for this release.
More information can be found in the official release notes article about those features, the “Lookup” flow screen component and the “Data Table” flow screen component.
4. Embed Screen Flow into Lightning Web Components
Finally, it’ll be possible to embed Screen Flows inside Lightning Web Components with improvements in the Winter’23 release! Until now, this was only possible using Aura components, which made many developers think twice about combining Lightning Components with reusable Screen Flows. Without any doubt, that’s one point toward LWC, which will allow developers to use the latest technologies to accomplish their requirements.
More information about this feature can be found in the official release notes article.
That’s it for now! Did you like the article about the Winter’23 Release? Do you have any doubts? Do not hesitate and get in touch with me. I invite you to watch the session recording available at Salesforce+. Also, make sure to check the full release notes.