Loading
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Extend Salesforce with Clicks, Not Code
Map Salesforce External Object Fields to GraphQL Types

Map Salesforce External Object Fields to GraphQL Types

When you map external object fields to GraphQL scalar types, you may want to optimize the type mapping for a better experience in Salesforce. For example, a String in the GraphQL schema can be mapped to a Picklist in Salesforce to improve data quality.

Required Editions

Available in: both Salesforce Classic and Lightning Experience

Available in: Developer Edition

Available for an extra cost in: Enterprise, Performance, and Unlimited Editions

GraphQL Scalar Type Salesforce External Object Field Type
ID Text
String Text
Int Number
Float Number
Boolean Checkbox
Enum Picklist
Enum (List) Picklist (Multi-select)
Note
Note To map Enum and Enum (List) GraphQL types to picklist or multi-select picklist field types in Salesforce, your resolver must include code that converts enum values to match the values in your database.

Salesforce Connect adapter for GraphQL supports these type conversions.

  • String (ISO 8601 Date) GraphQL type to Date Salesforce field type.
  • String (ISO 8601 Date/Time) GraphQL type to Date/Time Salesforce field type.
  • Int (epoch timestamp) GraphQL type to Date/Time Salesforce field type.
  • Customized GraphQL scalar type to Text Salesforce field type.
  • String GraphQL type to Picklist or Picklist (Multi-Select) Salesforce field types.

Mapping isn't supported for custom GraphQL object types.

Mapping for AWS AppSync

This table lists the mapping of AWS AppSync scalars to external object field types in Salesforce.

AWS AppSync Scalar Type Salesforce External Object Field Type
AWSDate Date
AWSTime Time
AWSDateTime Date/Time
AWSTimestamp Number
AWSEmail Email
AWSJSON Text Area (Long)
AWSPhone Phone
AWSURL URL
AWSIPAddress Text
 
Loading
Salesforce Help | Article