GraphQL API
Auto-generated GraphQL API reference for Backbase
GraphQL API
Backbase automatically generates GraphQL APIs based on entity definitions. The API provides CRUD operations, filtering, pagination, and relationship queries for entities.
API Structure
Base Types
For each entity you define, Backbase generates several GraphQL types:
- Entity Type: The main type representing your entity
- Input Type: For creating and updating entities
- Filter Type: For filtering queries
- Order Type: For sorting results
Generated Operations
Queries
# Get all entities with optional filtering and pagination
{entityName}List(
filter: {EntityName}Filter
order: {EntityName}Order
limit: Int
offset: Int
): [{EntityName}!]!
# Get entity by ID
{entityName}(id: ID!): {EntityName}
# Count entities with optional filtering
{entityName}Count(filter: {EntityName}Filter): Int!Mutations
For data CRUD operations, use the standard GraphQL mutations:
# Create new entity
create{EntityName}(input: {EntityName}Input!): {EntityName}!
# Update existing entity
update{EntityName}(id: ID!, input: {EntityName}Input!): {EntityName}!
# Delete entity
delete{EntityName}(id: ID!): Boolean!For schema management (entity creation, field management), use the JSON API instead of GraphQL mutations.
Field Types Mapping
| Backbase Field Type | GraphQL Type | Description |
|---|---|---|
TEXT | String | Text strings |
INT | Int | Integer numbers |
AMOUNT | Float | Decimal numbers for currency/amounts |
BOOLEAN | Boolean | True/false values |
DATE | String | Date in YYYY-MM-DD format |
DATETIME | String | ISO 8601 datetime string |
ID | ID | Unique identifier |
REFERENCE | ID | Reference to another entity |
ENUM | String | Enumeration value |
OBJECT | JSON | Complex object as JSON |
LOCATION | String | Geographic location data |
Filtering
Each entity has a filter type with the following operators:
String Fields
{
fieldName: String # Exact match
fieldName_contains: String # Contains substring
fieldName_startsWith: String # Starts with
fieldName_endsWith: String # Ends with
fieldName_in: [String!] # In list
fieldName_not: String # Not equal
}Numeric Fields
{
fieldName: Int # Exact match
fieldName_gt: Int # Greater than
fieldName_gte: Int # Greater than or equal
fieldName_lt: Int # Less than
fieldName_lte: Int # Less than or equal
fieldName_in: [Int!] # In list
fieldName_not: Int # Not equal
}Boolean Fields
{
fieldName: Boolean # Exact match
fieldName_not: Boolean # Not equal
}Ordering
Sort results using the order parameter:
{
fieldName: ASC | DESC
}Pagination
Use limit and offset for pagination:
query {
productList(limit: 10, offset: 20) {
id
name
}
}Example Queries
Simple Entity Query
query {
productList {
id
name
price
description
}
}Filtered Query
query {
productList(
filter: {
price_gte: 100
name_contains: "laptop"
}
order: { price: DESC }
limit: 10
) {
id
name
price
}
}Reference Fields
query {
orderList {
id
customer {
id
name
email
}
products {
id
name
price
}
}
}Multi-Language Support
For translatable entities, queries can include language parameters:
query {
productList(language: "es") {
id
name # Returns Spanish translation if available
description # Returns Spanish translation if available
}
}Error Handling
The API returns standard GraphQL errors with additional context:
{
"errors": [
{
"message": "Entity not found",
"path": ["product"],
"extensions": {
"code": "NOT_FOUND",
"entityId": "123"
}
}
]
}Schema Introspection
Use GraphQL introspection to explore your generated schema:
query {
__schema {
types {
name
fields {
name
type {
name
}
}
}
}
}