The userPermissions and customPermissions fields return permission grants for the calling user. Use these fields to determine whether the current user has specific permissions without querying the User object or making more API calls. This functionality mirrors the LWC @salesforce/userPermission and @salesforce/customPermission imports.
Pass permission names as a list in the names argument to return the grant status for each named permission in a single request. You can pass up to 25 permission names per call. A failure on one name doesn’t cause the operation to fail. Partial successes show failed names in the returned errors object.
The contentAssetUrls field returns resolved URLs for content assets in the calling org. Use this field to retrieve the URL for one or more content assets by name without constructing URLs manually. This functionality mirrors the LWC @salesforce/contentAssetUrl import.
Pass asset names as a list in the names argument to return the URL for each asset in a single request. A failure on one name doesn’t cause the operation to fail. Partial successes show failed names in the returned errors object.
The contentAssetUrls field returns a list of ContentAssetUrl types, one per name in the names argument.
names - A list of up to 25 content asset names to resolve. Use the same canonical form as the LWC import. Unmanaged assets use the developer name. Managed package assets include the namespace prefix, such as <namespace>__<developerName>. This argument is required.
The ContentAssetUrl type contains these fields.
name - The name of the content asset.
url - The authenticated file-asset servlet URL for the content asset.
Example: Get Content Asset URLs
This example retrieves the URLs for two content assets.
The resourceUrls field returns resolved URLs for static resources in the calling org. Use this field to retrieve the URL for one or more static resources by name without constructing URLs manually. This functionality mirrors the LWC @salesforce/resourceUrl import.
Pass resource names as a list in the names argument to return the URL for each resource in a single request. A failure on one name doesn’t cause the operation to fail. Partial successes show failed names in the returned errors object.
The resourceUrls field returns a list of ResourceUrl types, one per name in the names argument.
names - A list of up to 25 static resource names to resolve. Use the same canonical form as the LWC import. Unmanaged assets use the developer name. Managed package assets include the namespace prefix, such as <namespace>__<developerName>. This argument is required.
The ResourceUrl type contains these fields.
name - The name of the static resource.
url - The resolved URL for the static resource.
Example: Get Static Resource URLs
This example retrieves the URLs for two static resources.
The i18n field returns internationalization (i18n) data for the current user, mirroring the values available through LWC @salesforce/i18n imports. Use this field to get locale, currency, time zone, and date and number format data for the calling user in a single request.
The labels field returns resolved custom label values for the calling user. Use this field to get one or more custom labels by name, optionally specifying a locale and a fallback strategy if a translation isn’t available. This functionality mirrors the LWC @salesforce/label import.
namespace - The namespace for custom labels or framework section name, such as LightningForm, for standard labels. Defaults to c to resolve unmanaged custom labels.
names - A list of up to 100 custom label API names to retrieve. This argument is required.
locale - The locale to use when resolving label translations, for example, fr. Defaults to the calling user’s locale.
fallback - The fallback behavior when a translation isn’t available for the requested locale. Defaults to USER_DEFAULT. See LabelFallback.
LabelResult Type
The LabelResult type represents a resolved custom label value.
namespace - The namespace of the custom label.
name - The API name of the custom label.
value - The resolved label value for the requested locale, or null if the label doesn’t exist and fallback is NONE.
resolvedLocale - The locale that was used to resolve the label value. This locale can differ from the requested locale if a fallback occurred.
wasFallback - Indicates whether a fallback resolved the value rather than a direct translation match.
LabelFallback Enum
The LabelFallback enumeration controls how the API handles missing translations.
USER_DEFAULT - Falls back first to the user’s default language translation, then to the base label value if no language-level translation is available. This value is the default.
BASE_VALUE - Falls back directly to the base label value, skipping the user’s language.
NONE - Doesn’t fall back. If a translation for the requested locale is missing, value is null and the response includes a GraphQL error.