GraphQL Builder is a dedicated tool for composing and executing Salesforce GraphQL queries. Built on CodeMirror 6, it provides syntax highlighting, smart formatting, variable support, and real-time error detection — everything you need to explore your org's data and metadata through Salesforce's GraphQL API.
Salesforce GraphQL (built on the UI API) is a powerful alternative to SOQL. Use it to fetch related records efficiently in a single request, query metadata alongside data, or build more flexible queries with complex filtering and nested selections that would require multiple SOQL queries.
Open the TrackForcePro workspace and click the GraphQL tab. You'll see a two-pane layout:
No setup needed — just start writing a query and you're ready to execute against your org.
The query editor on the left is a professional code editor built for GraphQL. Write queries directly or paste them from other tools. The editor supports Salesforce's GraphQL schema and provides intelligent assistance.
Salesforce GraphQL queries follow the UI API pattern. Most queries start with the
uiapi root, followed by the operation (query, mutation, etc.):
query GetAccounts { uiapi { query { Account { edges { node { Id Name BillingCity } } }
} } }
query GetAccountsWithOpps { uiapi { query { Account { edges { node { Id Name
Opportunities { edges { node { Id StageName } } } } } } } } }
Tip: Copy working queries from other GraphQL clients (like Salesforce's own GraphQL endpoint explorer or Postman) and paste them here. TrackForcePro executes them against your org immediately.
The Variables panel (top-right) holds JSON-formatted variable definitions that parameterize your GraphQL query. This pattern lets you keep your query template static and swap in different values without rewriting the entire query.
$variableName syntax.
{ "accountId": "001D000000IRFmaIAH" } query GetAccount($id: String!) { uiapi { query { Account(where: { Id: { eq: $id } }) {
edges { node { Id Name } } } } } }
{ "searchTerm": "Acme" } query SearchAccounts($term: String!) { uiapi { query { Account(where: { Name: { like:
$term } }) { edges { node { Id Name BillingCity } } } } } }
Workflow: Write a parameterized query once, then change only the variables to run the same query against different data. Perfect for repeated analysis or batch operations.
Execute your GraphQL query against your Salesforce org using either method:
GraphQL Builder validates your query syntax and variables before sending them to Salesforce. If there are validation errors (missing fields, type mismatches, schema violations), you'll see a clear error message. Once validated and executed, your response appears in the right panel.
The response panel displays the result of your GraphQL query with professional formatting and error detection. Whether your query succeeds or fails, you get clear, actionable feedback.
When a query fails, errors appear with detailed explanations. Common errors include:
| Error Message | Cause & Fix |
|---|---|
Cannot query field "X" on type "Y" |
Field doesn't exist or is not queryable on that object. Check the Salesforce GraphQL schema or Field-level Security permissions. |
Expected Name, found "}" |
Syntax error in your query (missing field name, mismatched brackets). Review the line number and check brackets and commas. |
Variable $X is not defined |
Your query references a variable that isn't in the Variables panel. Add it to the Variables JSON object. |
Type mismatch for variable $X |
Variable value type doesn't match the query's parameter type (e.g., passing a string where an integer is expected). Check the query type definition and variable value. |
Access denied |
Your user lacks permission to query that field or object. Check Field-Level Security and Object permissions in Setup. |
Debugging tip: Copy the error message and use Salesforce's GraphQL documentation to validate your query structure. The line number in the error message points you to the problem area.
Id and Name. Verify it works,
then add relationships and fields incrementally. This prevents getting buried in complex
syntax errors.
uiapi { query { ObjectName { edges { node { fields } } } } } pattern. If
you're new to Salesforce GraphQL, study this structure in the documentation.
Account(where: { Name: { like: "Acme" } })) rather than
fetching all records and filtering client-side. Salesforce filters on the server, which
is much faster.
$accountId, $searchTerm, $pageSize) to make
parameterized queries self-documenting.
query($id: String!)). The ! means required; omit it for
optional variables.
Opportunities(first: 10) returns only the first 10.
query { uiapi { query { Account(where: {Id: {eq: "001..."}}) { edges { node { Id Name
Opportunities(first: 5) { edges { node { Id Name StageName } } } } } } } } }
query($domain: String!) { uiapi { query { Contact(where: {Email: {like: $domain}}) {
edges { node { Id Name Email } } } } } }{ "domain": "%@acme.com" }