---
title: "Data Models & Filtering"
description: "## Data Models ### GraphQL Response Structure #### MFilesObject (Base Structure) ``` { \"id\": 123, \"objectType\": 0, \"version\": 1, \"title\": \"Document Title\", \"createdUtc\": \"2024-01-15T10:30:00Z\", \"lastModifiedUtc\": \"2024-01-15T14:20:00Z\", \"isCheckedOut\": false, \"isDeleted\": false, \"isLatestVersion\": true, \"singleFile\": true, \"displayId\": \"DOC-123\", \"objectGuid\": \"12345678-1234-1234-1234-123456789012\" } ```…"
url: "https://extensionkit.unitfly.com/documentation/grapi-data-models-filtering/"
updated: "2026-01-23"
category: GRAPI Wiki and User Guide
---

# Data Models & Filtering

## Data Models

### GraphQL Response Structure

#### MFilesObject (Base Structure)

```
{
  "id": 123,
  "objectType": 0,
  "version": 1,
  "title": "Document Title",
  "createdUtc": "2024-01-15T10:30:00Z",
  "lastModifiedUtc": "2024-01-15T14:20:00Z",
  "isCheckedOut": false,
  "isDeleted": false,
  "isLatestVersion": true,
  "singleFile": true,
  "displayId": "DOC-123",
  "objectGuid": "12345678-1234-1234-1234-123456789012"
}
```

#### Custom Properties (Flattened)

```
{
  "nameOrTitle": "Contract Agreement",
  "description": "Service contract for 2024",
  "documentDate": "2024-01-15T00:00:00Z",
  "documentNumber": "CTR-2024-001",
  "isActive": true,
  "priority": 3.5,
  "contractValue": 150000.0
}
```

#### Lookup Properties

```
{
  "customer": {
    "id": 456,
    "title": "Acme Corporation",
    "customerCode": "CORP001",
    "isActive": true
  },
  "documentType": {
    "itemId": 10,
    "displayValue": "Service Contract",
    "name": "Service Contract"
  },
  "keywords": [
    { "itemId": 101, "displayValue": "Important", "name": "Important" },
    { "itemId": 102, "displayValue": "Legal", "name": "Legal" }
  ]
}
```

## Filtering Data

### GraphQL Filter Operators

GRAPI supports comprehensive filtering operators for different data types:

#### String Operators

- **eq**: Exact match
- **neq**: Not equal
- **contains**: Contains substring
- **ncontains**: Does not contain substring
- **startsWith**: Starts with text
- **nstartsWith**: Does not start with text
- **endsWith**: Ends with text
- **nendsWith**: Does not end with text
- **in**: Value in list
- **nin**: Value not in list

#### Numeric Operators (Int, Float, DateTime)

- **eq**: Equal to
- **neq**: Not equal to
- **gt**: Greater than
- **gte**: Greater than or equal
- **lt**: Less than
- **lte**: Less than or equal
- **in**: Value in list
- **nin**: Value not in list

#### Boolean Operators

- **eq**: Equal to (true/false)
- **neq**: Not equal to

#### Lookup Object Operators

- **eq**: Object ID equals
- **neq**: Object ID not equals
- **in**: Object ID in list
- **nin**: Object ID not in list
- **some**: At least one related object matches (for multi-select)
- **none**: No related objects match (for multi-select)
- **all**: All related objects match (for multi-select)

### Nested Object Filtering

```
query NestedFiltering {
  production {
    documents(where: {
      customer: {
        # Filter on customer properties        customerCode: { startsWith: "CORP" }
        isActive: { eq: true }
        address: {
          # Filter on customer address properties          country: { eq: "USA" }
          city: { in: ["New York", "Los Angeles"] }
        }
      }
    }) {
      id
      title
      customer {
        title
        customerCode
        address {
          city
          country
        }
      }
    }
  }
}
```
