# Queries

Queries retrieve data from the system by specifying the fields to be returned.

Source: https://www.twisp.com/docs/reference/graphql/queries

## account
Get a single account by its `accountId`.
#### Resolves to
[`Account`](/docs/reference/graphql/types/object#account)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier. _Example:_ ``"3ea12e45-7df2-4293-9434-feb792affc91"``

**Request**

```graphql
query GetAccount {
  account(id: "a9c8dde6-c0e5-407c-9d99-029c523f7ea8") {
    accountId
    code
    name
    description
    normalBalanceType
    status
  }
}
```
**Response**

```json
{
  "data": {
    "account": {
      "accountId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8",
      "code": "SETTLE.CARD",
      "name": "Card Settlement",
      "description": "Settlement account for card transactions.",
      "normalBalanceType": "CREDIT",
      "status": "ACTIVE"
    }
  }
}
```

## accountSet
Get a single account set by its `accountSetId`.
#### Resolves to
[`AccountSet`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
query GetAccountSet {
  accountSet(id: "29ef3f18-97b1-40d9-9852-27f1607b6ca8") {
    accountSetId
    name
    description
    members(first: 10) {
      nodes {
        ... on Account {
          accountId
          code
          name
        }
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "accountSet": {
      "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
      "name": "Customers",
      "description": "All customer wallets.",
      "members": {
        "nodes": [
          {
            "accountId": "ae9d36cb-dcf5-41a9-bc1e-99a1cf56ef5b",
            "code": "CUST.Bobby",
            "name": "Bobby"
          },
          {
            "accountId": "260fd651-8819-4f99-9c8a-87d27e03ee4c",
            "code": "CUST.Alicia",
            "name": "Alicia"
          }
        ]
      }
    }
  }
}
```

## accountSets
Select one or more account sets. Specify the index to use and apply filters to your query.
#### Resolves to
[`AccountSetConnection!`](/docs/reference/graphql/types/object#account-set-connection)
#### Arguments

---
* ``index`` - [`AccountSetIndexInput!`](/docs/reference/graphql/types/input#account-set-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`AccountSetFilterInput`](/docs/reference/graphql/types/input#account-set-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of sets to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve sets. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAccountSets {
  accountSets(
    index: { name: NAME }
    where: {
      name: { like: "" }
      journalId: { eq: "822cb59f-ce51-4837-8391-2af3b7a5fc51" }
    }
    first: 10
  ) {
    nodes {
      accountSetId
      name
      description
    }
  }
}
```
**Response**

```json
{
  "data": {
    "accountSets": {
      "nodes": [
        {
          "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
          "name": "Customers",
          "description": "All customer wallets."
        },
        {
          "accountSetId": "0b195688-c1e6-4577-b5dd-0075c2feca35",
          "name": "Settlement",
          "description": "All settlement accounts."
        }
      ]
    }
  }
}
```

## accounts
Select one or more accounts. Specify the index to use and apply filters to your query.
#### Resolves to
[`AccountConnection!`](/docs/reference/graphql/types/object#account-connection)
#### Arguments

---
* ``index`` - [`AccountIndexInput!`](/docs/reference/graphql/types/input#account-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`AccountFilterInput`](/docs/reference/graphql/types/input#account-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAccounts {
  accounts(
    index: { name: CODE }
    where: { code: { like: "CUST." } }
    first: 2
  ) {
    nodes {
      accountId
      code
      name
      description
      normalBalanceType
      status
    }
  }
}
```
**Response**

```json
{
  "data": {
    "accounts": {
      "nodes": [
        {
          "accountId": "260fd651-8819-4f99-9c8a-87d27e03ee4c",
          "code": "CUST.Alicia",
          "name": "Alicia",
          "description": "Alicia's customer wallet.",
          "normalBalanceType": "DEBIT",
          "status": "ACTIVE"
        },
        {
          "accountId": "ae9d36cb-dcf5-41a9-bc1e-99a1cf56ef5b",
          "code": "CUST.Bobby",
          "name": "Bobby",
          "description": "Bobby's customer wallet.",
          "normalBalanceType": "DEBIT",
          "status": "ACTIVE"
        }
      ]
    }
  }
}
```

## ach
### configuration
Read an existing configuration for processing ACH files.
#### Resolves to
[`AchConfiguration`](/docs/reference/graphql/types/object#ach-configuration)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier. _Example:_ ``"fe27128a-b331-4e0e-94f8-9a32443fee36"``

**Request**

```graphql
query Configuration {
  ach {
    configuration(id: "1dc71d60-f463-4bb6-b82a-ab42e2f923ff") {
      configId
      timeZone
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "configuration": {
        "configId": "1dc71d60-f463-4bb6-b82a-ab42e2f923ff",
        "timeZone": "America/Los_Angeles"
      }
    }
  }
}
```

### configurations
#### Resolves to
[`AchConfigurationConnection!`](/docs/reference/graphql/types/object#ach-configuration-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

**Request**

```graphql
query Configurations {
  ach {
    configurations(first: 100) {
      nodes {
        configId
        timeZone
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "configurations": {
        "nodes": [
          {
            "configId": "1dc71d60-f463-4bb6-b82a-ab42e2f923ff",
            "timeZone": "America/Los_Angeles"
          }
        ]
      }
    }
  }
}
```

### file
Read the file info for status of file processing.
#### Resolves to
[`AchFileInfo`](/docs/reference/graphql/types/object#ach-file-info)
#### Arguments

---
* ``id`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier returned from processFile mutation. _Example:_ ``"549f0093-6476-4625-b38e-2109a0d5d3f8"``
---
* ``fileKey`` - [`String`](/docs/reference/graphql/types/scalar#string)
* File key of uploaded ACH file. _Example:_ ``"ppd-credits.ach"``
---
* ``configId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* Configuration identifier used in processFile mutation. _Example:_ ``"987908ab-34d4-42f5-9213-c835f96545e1"``

### files
#### Resolves to
[`AchFileInfoConnection!`](/docs/reference/graphql/types/object#ach-file-info-connection)
#### Arguments

---
* ``index`` - [`AchFileInfoIndexInput!`](/docs/reference/graphql/types/input#ach-file-info-index-input)
*
---
* ``where`` - [`AchFileInfoFilterInput!`](/docs/reference/graphql/types/input#ach-file-info-filter-input)
*
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## admin
Queries in the `admin` namespace retrieve organization data like users, groups, and tenants.
### groups
Get the list of groups, ordered by `name`.
#### Resolves to
[`GroupConnection!`](/docs/reference/graphql/types/object#group-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAdminGroups {
  admin {
    groups(first: 5) {
      nodes {
        name
        description
        policy
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "groups": {
        "nodes": [
          {
            "name": "Admin",
            "description": "Default Group",
            "policy": "[{\"actions\": [\"*\"],\"effect\": \"ALLOW\",\"resources\":[\"*\"]}]"
          },
          {
            "name": "deny-policy-1",
            "description": "a group with a deny policy",
            "policy": "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"]}]"
          },
          {
            "name": "read-only-policy-1",
            "description": "a group with a read-only policy",
            "policy": "[{\"actions\": [\"db:Select\"],\"effect\": \"ALLOW\",\"resources\":[\"*\"]}]"
          }
        ]
      }
    }
  }
}
```

### organization
Get the current organization.
#### Resolves to
[`Organization!`](/docs/reference/graphql/types/object#organization)
#### Arguments

**Request**

```graphql
query GetAdminOrganization {
  admin {
    organization {
      id
      name
      description
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "organization": {
        "id": "932343ab-33ee-410d-9663-7ddaec4d5bfa",
        "name": "test_org",
        "description": "this is a test organization"
      }
    }
  }
}
```

### restoreStatus
Retrieves the status of a restoration.
#### Resolves to
[`RestoreStatus`](/docs/reference/graphql/types/object#restore-status)
#### Arguments

---
* ``executionId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

### tenants
Get the list of tenants, ordered by `accountId`.
#### Resolves to
[`TenantConnection!`](/docs/reference/graphql/types/object#tenant-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAdminTenants {
  admin {
    tenants(first: 5) {
      nodes {
        name
        organizationId
        description
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "tenants": {
        "nodes": [
          {
            "name": "PreProduction",
            "organizationId": "932343ab-33ee-410d-9663-7ddaec4d5bfa",
            "description": "tenant for preprod integrations"
          },
          {
            "name": "TestTenant",
            "organizationId": "932343ab-33ee-410d-9663-7ddaec4d5bfa",
            "description": "this is a test tenant"
          }
        ]
      }
    }
  }
}
```

### usage
Retrieves the read and write usage units on per day basis. The metrics returned are on the half open interval.

 returns metris `period >= 2025-06-01T00:00:00.000Z && period < 2025-07-01T00:00:00.000Z`
#### Resolves to
[`Usage`](/docs/reference/graphql/types/object#usage)
#### Arguments

---
* ``input`` - [`UsageInput!`](/docs/reference/graphql/types/input#usage-input)
*

### users
Get the list of human users, ordered by `email`.
#### Resolves to
[`UserConnection!`](/docs/reference/graphql/types/object#user-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAdminUsers {
  admin {
    users(first: 5) {
      nodes {
        email
        organizationId
        groupIds
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "users": {
        "nodes": [
          {
            "email": "test@twisp.com",
            "organizationId": "932343ab-33ee-410d-9663-7ddaec4d5bfa",
            "groupIds": ["4dcef8d5-186b-4db1-aa00-8d5b2eee85f8"]
          }
        ]
      }
    }
  }
}
```

## attachedControls
List all velocity controls attached the specified Account or Account Set.
#### Resolves to
[`ResolvedVelocityControlConnection!`](/docs/reference/graphql/types/object#resolved-velocity-control-connection)
#### Arguments

---
* ``accountId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Account or Account Set Id to look up attached controls
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
---
* ``after`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. _Default:_ ``""``

## auth
Queries in the `auth` namespace are used to retrieve clients and their policies. Use the `client` query to retrieve a single client, and `clients` to retrieve a list of clients.
### client
Get a single client by the `principal`.
#### Resolves to
[`Client`](/docs/reference/graphql/types/object#client)
#### Arguments

---
* ``principal`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Principal of the client.

**Request**

```graphql
query GetAuthClient($authClientGithub: String!) {
  auth {
    client(principal: $authClientGithub) {
      principal
      name
      policies {
        effect
        actions
        resources
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "auth": {
      "client": {
        "principal": "arn:aws:iam::048962233173:user/github.action",
        "name": "Github",
        "policies": [
          {
            "effect": "ALLOW",
            "actions": ["SELECT", "INSERT", "UPDATE", "DELETE"],
            "resources": ["financial.*"]
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "authClientGithub": "arn:aws:iam::048962233173:user/github.action"
}
```
### clients
Lists all clients.
#### Resolves to
[`ClientConnection!`](/docs/reference/graphql/types/object#client-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetAuthClients {
  auth {
    clients(first: 10) {
      nodes {
        principal
        name
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "auth": {
      "clients": {
        "nodes": [
          {
            "principal": "arn:aws:iam::048962233173:user/feed.action",
            "name": "Read Stream"
          },
          {
            "principal": "arn:aws:iam::048962233173:user/github.action",
            "name": "Github"
          }
        ]
      }
    }
  }
}
```

## balance
Get a balance for an account.
#### Resolves to
[`Balance`](/docs/reference/graphql/types/object#balance)
#### Arguments

---
* ``journalId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* ID of the journal for the balance. If omitted, the default journal will be used.
---
* ``accountId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* ID of the account for the balance.
---
* ``currency`` - [`CurrencyCode!`](/docs/reference/graphql/types/scalar#currency-code)
* Currency of the balance. _Default:_ ``"USD"``
---
* ``calculationId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* If provided, look up based on calculation id and dimensions for calculation.
---
* ``dimension`` - [`JSON`](/docs/reference/graphql/types/scalar#json)
* If provided, look up based on calculation id and dimensions for calculation. The values in this should be string representation of values.
---
* ``effective`` - [`Effective`](/docs/reference/graphql/types/input#effective)
* If enabled and provided, look up balances based on effective date.
---
* ``materialize`` - [`Boolean`](/docs/reference/graphql/types/scalar#boolean)
* If concurrent enabled, compute balance with all visible transactions.
---
* ``type`` - [`BalanceType`](/docs/reference/graphql/types/enum#balance-type)
* If concurrent enabled, the isolation level of the balance returned.

**Request**

```graphql
query GetBalance($journalGLId: UUID!, $accountCardSettlementId: UUID!) {
  balance(
    accountId: $accountCardSettlementId
    journalId: $journalGLId
    currency: "USD"
  ) {
    available(layer: SETTLED) {
      drBalance {
        units
      }
      crBalance {
        units
      }
      normalBalance {
        formatted(as: { locale: "en-US" })
      }
    }
    entries(first: 10) {
      nodes {
        entryType
        amount {
          units
          currency
        }
        direction
        layer
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "balance": {
      "available": {
        "drBalance": { "units": "4.53" },
        "crBalance": { "units": "0" },
        "normalBalance": { "formatted": "-$4.53" }
      },
      "entries": {
        "nodes": [
          {
            "entryType": "CARD_HOLD_CLEAR_CR",
            "amount": { "units": "4.53", "currency": "USD" },
            "direction": "CREDIT",
            "layer": "PENDING"
          },
          {
            "entryType": "CARD_SETTLEMENT_DR",
            "amount": { "units": "4.53", "currency": "USD" },
            "direction": "DEBIT",
            "layer": "SETTLED"
          },
          {
            "entryType": "CARD_HOLD_DR",
            "amount": { "units": "4.53", "currency": "USD" },
            "direction": "DEBIT",
            "layer": "PENDING"
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
  "accountCardSettlementId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8"
}
```
## balances
Select one or more balances. Specify the index to use and apply filters to your query.
#### Resolves to
[`BalanceConnection!`](/docs/reference/graphql/types/object#balance-connection)
#### Arguments

---
* ``index`` - [`BalanceIndexInput!`](/docs/reference/graphql/types/input#balance-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`BalanceFilterInput`](/docs/reference/graphql/types/input#balance-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetBalances($journalGLId: String!, $accountCustomerAliciaId: String!) {
  balances(
    index: { name: ACCOUNT_ID }
    where: {
      accountId: { eq: $accountCustomerAliciaId }
      journalId: { eq: $journalGLId }
    }
    first: 20
  ) {
    nodes {
      entry {
        entryType
      }
      currency
      settled {
        normalBalance {
          formatted(as: { locale: "en-US" })
        }
      }
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "balances": {
      "nodes": [
        {
          "entry": { "entryType": "FX_BUY_CR" },
          "currency": "EUR",
          "settled": { "normalBalance": { "formatted": "€2.0145" } },
          "version": 1
        },
        {
          "entry": { "entryType": "FX_SELL_DR" },
          "currency": "USD",
          "settled": { "normalBalance": { "formatted": "$1.63" } },
          "version": 6
        }
      ]
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
  "accountCustomerAliciaId": "260fd651-8819-4f99-9c8a-87d27e03ee4c"
}
```
## bulk
### execution
Retrieve single bulk query execution by it's `executionId`.
#### Resolves to
[`BulkQueryExecution`](/docs/reference/graphql/types/object#bulk-query-execution)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

### executions
List bulk query executions.
#### Resolves to
[`BulkQueryExecutionConnection!`](/docs/reference/graphql/types/object#bulk-query-execution-connection)
#### Arguments

---
* ``index`` - [`BulkQueryExecutionIndexInput!`](/docs/reference/graphql/types/input#bulk-query-execution-index-input)
* Select the index to use.
---
* ``where`` - [`BulkQueryExecutionFilterInput`](/docs/reference/graphql/types/input#bulk-query-execution-filter-input)
* Filter conditions.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor for pagination.

## calculation
Retrieve a calculation by its identifier.
#### Resolves to
[`Calculation`](/docs/reference/graphql/types/object#calculation)
#### Arguments

---
* ``calculationId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

**Request**

```graphql
query ReadCalculation {
  calculation(calculationId: "5867b5dd-fc69-416c-80f5-62e8a53610d5") {
    calculationId
    code
    description
    dimensions {
      alias
      value
    }
  }
}
```
**Response**

```json
{
  "data": {
    "calculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5",
      "code": "EFFECTIVE_DATE",
      "description": "Track balances per EFFECTIVE_DATE in an account.",
      "dimensions": [
        {
          "alias": "effectiveDate",
          "value": "context.vars.transaction.effective"
        }
      ]
    }
  }
}
```

## calculations
Retrieve calculations by index.
#### Resolves to
[`CalculationConnection!`](/docs/reference/graphql/types/object#calculation-connection)
#### Arguments

---
* ``index`` - [`CalculationIndexInput!`](/docs/reference/graphql/types/input#calculation-index-input)
*
---
* ``where`` - [`CalculationFilterInput`](/docs/reference/graphql/types/input#calculation-filter-input)
*
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

**Request**

```graphql
query ListActiveGlobalCalculations {
  calculations(
    index: { name: GLOBAL }
    where: { status: { eq: "ACTIVE" } }
    first: 1
  ) {
    nodes {
      calculationId
      code
      description
      dimensions {
        alias
        value
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "calculations": {
      "nodes": [
        {
          "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5",
          "code": "EFFECTIVE_DATE",
          "description": "Track balances per EFFECTIVE_DATE in an account.",
          "dimensions": [
            {
              "alias": "effectiveDate",
              "value": "context.vars.transaction.effective"
            }
          ]
        }
      ]
    }
  }
}
```

## entries
Select one or more entries. Specify the index to use and apply filters to your query.
#### Resolves to
[`EntryConnection!`](/docs/reference/graphql/types/object#entry-connection)
#### Arguments

---
* ``index`` - [`EntryIndexInput!`](/docs/reference/graphql/types/input#entry-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`EntryFilterInput`](/docs/reference/graphql/types/input#entry-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int`](/docs/reference/graphql/types/scalar#int)
* Return the first n-edges of a search. Use `after` to paginate forward.
---
* ``last`` - [`Int`](/docs/reference/graphql/types/scalar#int)
* Return previous n-edges of a search relative to the `before` cursor.
  **NOTE:** only available on search indexes.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor to paginate forward through a search result.
  When no cursor is provided, the query uses the default starting cursor.
---
* ``before`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor to paginate backwards through a search result.

  **NOTE:** Only available on search indexes.

**Request**

```graphql
query GetEntries {
  entries(
    index: { name: TRANSACTION_ID }
    where: { transactionId: { eq: "114a8b1e-d00b-4e13-ab27-ec3472622c0a" } }
    first: 10
  ) {
    nodes {
      entryType
      account {
        name
      }
      direction
      amount {
        units
        currency
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "entries": {
      "nodes": [
        {
          "entryType": "CARD_HOLD_CR",
          "account": { "name": "Alicia" },
          "direction": "CREDIT",
          "amount": { "units": "4.53", "currency": "USD" }
        },
        {
          "entryType": "CARD_HOLD_DR",
          "account": { "name": "Card Settlement" },
          "direction": "DEBIT",
          "amount": { "units": "4.53", "currency": "USD" }
        }
      ]
    }
  }
}
```

## entry
Get a single entry by its `entryId`.
#### Resolves to
[`Entry`](/docs/reference/graphql/types/object#entry)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

## events
Mutations in the `events` namespace are used to manage event subscriptions, such as webhooks.
### endpoint
Get a single endpoint by it's `endpointId`
#### Resolves to
[`Endpoint`](/docs/reference/graphql/types/object#endpoint)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

**Request**

```graphql
query GetEndpoint {
  events {
    endpoint(id: "345940ed-2726-4b20-88aa-820857ac0e68") {
      endpointId
      status
      endpointType
      url
      subscription
      description
    }
  }
}
```
**Response**

```json
{
  "data": {
    "events": {
      "endpoint": {
        "endpointId": "345940ed-2726-4b20-88aa-820857ac0e68",
        "status": "ENABLED",
        "endpointType": "WEBHOOK",
        "url": "https://webhook.site/twisp-webhook-test",
        "subscription": ["balance*", "account.*"],
        "description": "subscribe to balance and account events"
      }
    }
  }
}
```

### endpoints
Select one or more endpoints. Specify the index to use and apply filters to your query.
#### Resolves to
[`EndpointConnection!`](/docs/reference/graphql/types/object#endpoint-connection)
#### Arguments

---
* ``index`` - [`EndpointIndexInput!`](/docs/reference/graphql/types/input#endpoint-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`EndpointFilterInput!`](/docs/reference/graphql/types/input#endpoint-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

## files
### list
#### Resolves to
[`[String]`]($gql:scalar:String)
#### Arguments

---
* ``keyPrefix`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## iso8583
### config
Read an existing ISO8583 configuration.
#### Resolves to
[`ISO8583Config`](/docs/reference/graphql/types/object#iso8583config)
#### Arguments

---
* ``configId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier. _Example:_ ``"670504f6-0515-11f0-a441-069b540ea27c"``

**Request**

```graphql
query GetISO8583Config {
  iso8583 {
    config(configId: "670504f6-0515-11f0-a441-069b540ea27c") {
      id
      configId
      journalId
      settlementAccountId
      timeZone
      description
      processor
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "iso8583": {
      "config": {
        "id": "iso8583:config:670504f6-0515-11f0-a441-069b540ea27c",
        "configId": "670504f6-0515-11f0-a441-069b540ea27c",
        "journalId": "8b65c8dc-0515-11f0-a441-069b540ea27c",
        "settlementAccountId": "779886bc-0515-11f0-aa78-069b540ea27c",
        "timeZone": "America/Chicago",
        "description": "ISO8583 Test Config 1",
        "processor": "I2C",
        "version": 1
      }
    }
  }
}
```

### configs
List all ISO8583 configurations.
#### Resolves to
[`ISO8583ConfigConnection!`](/docs/reference/graphql/types/object#iso8583config-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.
---
* ``sort`` - [`SortOrder`](/docs/reference/graphql/types/enum#sort-order)
* Sort order for results.

**Request**

```graphql
query ListISO8583Configs {
  iso8583 {
    configs(first: 10) {
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
      edges {
        node {
          configId
          journalId
          settlementAccountId
          timeZone
          description
          processor
        }
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "iso8583": {
      "configs": {
        "pageInfo": {
          "hasNextPage": false,
          "hasPreviousPage": false
        },
        "edges": [
          {
            "node": {
              "configId": "670504f6-0515-11f0-a441-069b540ea27c",
              "journalId": "8b65c8dc-0515-11f0-a441-069b540ea27c",
              "settlementAccountId": "779886bc-0515-11f0-aa78-069b540ea27c",
              "timeZone": "America/Chicago",
              "description": "ISO8583 Test Config 1",
              "processor": "I2C"
            }
          },
          {
            "node": {
              "configId": "7e0d3fa2-0515-11f0-a6b2-069b540ea27c",
              "journalId": "8b65c8dc-0515-11f0-a441-069b540ea27c",
              "settlementAccountId": "779886bc-0515-11f0-aa78-069b540ea27c",
              "timeZone": "America/New_York",
              "description": "ISO8583 Test Config 2",
              "processor": "I2C"
            }
          }
        ]
      }
    }
  }
}
```

## journal
Get a single journal by its `journalId`. If `journalId` is omitted, return the default journal.
#### Resolves to
[`Journal`](/docs/reference/graphql/types/object#journal)
#### Arguments

---
* ``id`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
query GetJournal($journalGLId: UUID!) {
  journal(id: $journalGLId) {
    name
    description
    status
    version
  }
}
```
**Response**

```json
{
  "data": {
    "journal": {
      "name": "GL",
      "description": "General Ledger",
      "status": "ACTIVE",
      "version": 1
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
## journals
Select one or more journals. Specify the index to use and apply filters to your query.
#### Resolves to
[`JournalConnection!`](/docs/reference/graphql/types/object#journal-connection)
#### Arguments

---
* ``index`` - [`JournalIndexInput!`](/docs/reference/graphql/types/input#journal-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`JournalFilterInput`](/docs/reference/graphql/types/input#journal-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetJournals {
  journals(
    index: { name: STATUS }
    where: { status: { eq: "ACTIVE" } }
    first: 10
  ) {
    nodes {
      journalId
      name
      description
      status
    }
  }
}
```
**Response**

```json
{
  "data": {
    "journals": {
      "nodes": [
        {
          "journalId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
          "name": "GL",
          "description": "General Ledger",
          "status": "ACTIVE"
        },
        {
          "journalId": "432d2b1b-c647-4b0a-aa78-0945241f8e6d",
          "name": "SL",
          "description": "Securities Ledger",
          "status": "ACTIVE"
        }
      ]
    }
  }
}
```

## kv
Read a single key/value record by its natural key.

Limits:
- `namespace`: max 512 UTF-8 bytes
- `key`: max 512 UTF-8 bytes
#### Resolves to
[`KVValue`](/docs/reference/graphql/types/object#kvvalue)
#### Arguments

---
* ``namespace`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``key`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## kvs
List key/value records through either the built-in namespace index or a custom index.

Notes:
- `index: { name: Namespace }` requires `where.namespace.eq`
- `index: { name: Custom }` requires `where.custom.index` plus the custom index partition filter(s)
#### Resolves to
[`KVConnection!`](/docs/reference/graphql/types/object#kvconnection)
#### Arguments

---
* ``index`` - [`KVIndexInput!`](/docs/reference/graphql/types/input#kvindex-input)
*
---
* ``where`` - [`KVFilterInput`](/docs/reference/graphql/types/input#kvfilter-input)
*
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## node
#### Resolves to
[`Node`](/docs/reference/graphql/types/interface#node)
#### Arguments

---
* ``id`` - [`ID!`](/docs/reference/graphql/types/scalar#id)
* The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.

## schema
Queries in the `schema` namespace are used to retrieve information about custom indexes, aggregates, and historical indexes.
### index
Get a single index by `name`.
#### Resolves to
[`Index`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Unique identifier of this index. Typically human readable.
---
* ``on`` - [`IndexOnEnum!`](/docs/reference/graphql/types/enum#index-on-enum)
* The type of record this index applies to.
---
* ``viewName`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Name of the target view. Required when `on: View`; ignored otherwise.

**Request**

```graphql
query GetSchemaIndex($indexName: String!) {
  schema {
    index(name: $indexName, on: Account) {
      name
      on
      unique
      range {
        alias
        value
        sort
      }
      partition {
        alias
        value
      }
      constraints
    }
  }
}
```
**Response**

```json
{
  "data": {
    "schema": {
      "index": {
        "name": "Account.metadata.type",
        "on": "Account",
        "unique": false,
        "range": [
          {
            "alias": "type",
            "value": "string(document.metadata.type)",
            "sort": "ASC"
          }
        ],
        "partition": [
          { "alias": "type", "value": "string(document.metadata.type)" }
        ],
        "constraints": { "hasCategory": "has(document.metadata.type)" }
      }
    }
  }
}
```
**Variables**

```json
{
  "indexName": "Account.metadata.type"
}
```
### indexes
List all indexes, ordered by `name`.
#### Resolves to
[`IndexConnection!`](/docs/reference/graphql/types/object#index-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetSchemaIndexes {
  schema {
    indexes(first: 10) {
      nodes {
        name
        range {
          alias
          value
          sort
        }
        partition {
          alias
          value
        }
        on
        constraints
        unique
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "schema": {
      "indexes": {
        "nodes": [
          {
            "name": "Account.metadata.type",
            "range": [
              {
                "alias": "type",
                "value": "string(document.metadata.type)",
                "sort": "ASC"
              }
            ],
            "partition": [
              { "alias": "type", "value": "string(document.metadata.type)" }
            ],
            "on": "Account",
            "constraints": { "hasCategory": "has(document.metadata.type)" },
            "unique": false
          },
          {
            "name": "AccountSet.metadata.type",
            "range": [
              {
                "alias": "type",
                "value": "string(document.metadata.type)",
                "sort": "ASC"
              }
            ],
            "partition": [
              { "alias": "type", "value": "string(document.metadata.type)" }
            ],
            "on": "AccountSet",
            "constraints": { "hasCategory": "has(document.metadata.type)" },
            "unique": false
          },
          {
            "name": "Transaction.metadata.category",
            "range": [
              {
                "alias": "category",
                "value": "string(document.metadata.category)",
                "sort": "ASC"
              }
            ],
            "partition": [
              {
                "alias": "category",
                "value": "string(document.metadata.category)"
              }
            ],
            "on": "Transaction",
            "constraints": { "hasCategory": "has(document.metadata.category)" },
            "unique": false
          }
        ]
      }
    }
  }
}
```

### view
Get a single view by `name`.
#### Resolves to
[`View`](/docs/reference/graphql/types/object#view)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Unique identifier of this view. Typically human readable.

### views
List all views, ordered by `name`.
#### Resolves to
[`ViewConnection!`](/docs/reference/graphql/types/object#view-connection)
#### Arguments

---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

## tranCode
Get a single tran code by its `tranCodeId`.
#### Resolves to
[`TranCode`](/docs/reference/graphql/types/object#tran-code)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
query GetTranCode($tcCardHoldId: UUID!) {
  tranCode(id: $tcCardHoldId) {
    code
    description
    params {
      name
      type
      description
    }
    transaction {
      journalId
      effective
      correlationId
      description
    }
    entries {
      accountId
      layer
      direction
      units
      currency
    }
    status
    metadata
  }
}
```
**Response**

```json
{
  "data": {
    "tranCode": {
      "code": "CARD_HOLD",
      "description": "Place an authorization hold on an account for the amount specified.",
      "params": [
        {
          "name": "account",
          "type": "UUID",
          "description": "The account to place the hold on."
        },
        {
          "name": "amount",
          "type": "DECIMAL",
          "description": "The amount of the hold."
        },
        {
          "name": "currency",
          "type": "STRING",
          "description": "Currency used for transaction."
        },
        {
          "name": "isDebit",
          "type": "BOOLEAN",
          "description": "If true (default), debit the account specified. If false, credit the account."
        },
        {
          "name": "correlation",
          "type": "STRING",
          "description": "Correlation identifier to group transactions following on from this hold."
        },
        {
          "name": "effective",
          "type": "DATE",
          "description": "Effective date of the transaction."
        }
      ],
      "transaction": {
        "journalId": "uuid('822cb59f-ce51-4837-8391-2af3b7a5fc51')",
        "effective": "params.effective",
        "correlationId": "params.correlation",
        "description": "'Card authorization hold placed for ' + string(params.amount) + ' ' + params.currency"
      },
      "entries": [
        {
          "accountId": "params.account",
          "layer": "PENDING",
          "direction": "params.isDebit ? DEBIT : CREDIT",
          "units": "params.amount",
          "currency": "params.currency"
        },
        {
          "accountId": "uuid('a9c8dde6-c0e5-407c-9d99-029c523f7ea8')",
          "layer": "PENDING",
          "direction": "params.isDebit ? CREDIT : DEBIT",
          "units": "params.amount",
          "currency": "params.currency"
        }
      ],
      "status": "ACTIVE",
      "metadata": { "category": "Card" }
    }
  }
}
```
**Variables**

```json
{
  "tcCardHoldId": "8f67fb0b-795a-47b3-9b03-40351e8ac584"
}
```
## tranCodes
Select one or more tran codes. Specify the index to use and apply filters to your query.
#### Resolves to
[`TranCodeConnection!`](/docs/reference/graphql/types/object#tran-code-connection)
#### Arguments

---
* ``index`` - [`TranCodeIndexInput!`](/docs/reference/graphql/types/input#tran-code-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`TranCodeFilterInput`](/docs/reference/graphql/types/input#tran-code-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetTranCodes {
  tranCodes(
    index: { name: STATUS }
    where: { status: { eq: "ACTIVE" } }
    first: 10
  ) {
    nodes {
      code
      metadata
    }
  }
}
```
**Response**

```json
{
  "data": {
    "tranCodes": {
      "nodes": [
        { "code": "ACH_CREDIT", "metadata": { "category": "ACH" } },
        { "code": "ACH_DEBIT", "metadata": { "category": "ACH" } },
        { "code": "BOOK_TRANSFER", "metadata": { "category": "Internal" } },
        { "code": "CARD_HOLD", "metadata": { "category": "Card" } },
        { "code": "CARD_HOLD_CANCEL", "metadata": { "category": "Card" } },
        { "code": "CARD_HOLD_EXPIRE", "metadata": { "category": "Card" } },
        {
          "code": "CARD_HOLD_MODIFICATION",
          "metadata": { "category": "Card" }
        },
        { "code": "CARD_TX_CLEARING", "metadata": { "category": "Card" } },
        { "code": "EXCHANGE_CURRENCY", "metadata": { "category": "FX" } }
      ]
    }
  }
}
```

## transaction
Get a single transaction by its `transactionId`.
#### Resolves to
[`Transaction`](/docs/reference/graphql/types/object#transaction)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
query GetTransaction {
  transaction(id: "434696a7-56e5-4e14-a97a-884820690a22") {
    description
    effective
    tranCode {
      code
    }
    journal {
      name
    }
    metadata
    entries(first: 10) {
      nodes {
        sequence
        entryType
        layer
        direction
        account {
          name
        }
        amount {
          formatted(as: { locale: "en-US" })
        }
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "transaction": {
      "description": "Exchange 2.37 USD for EUR at a 1:0.85 exchange rate.",
      "effective": "2022-09-11",
      "tranCode": { "code": "EXCHANGE_CURRENCY" },
      "journal": { "name": "GL" },
      "metadata": { "buy": "EUR", "rate": "0.85", "sell": "USD" },
      "entries": {
        "nodes": [
          {
            "sequence": 0,
            "entryType": "FX_SELL_DR",
            "layer": "SETTLED",
            "direction": "CREDIT",
            "account": { "name": "Alicia" },
            "amount": { "formatted": "$2.37" }
          },
          {
            "sequence": 1,
            "entryType": "FX_SELL_CR",
            "layer": "SETTLED",
            "direction": "DEBIT",
            "account": { "name": "Foreign Exchange Broker" },
            "amount": { "formatted": "$2.37" }
          },
          {
            "sequence": 2,
            "entryType": "FX_BUY_DR",
            "layer": "SETTLED",
            "direction": "CREDIT",
            "account": { "name": "Foreign Exchange Broker" },
            "amount": { "formatted": "€2.0145" }
          },
          {
            "sequence": 3,
            "entryType": "FX_BUY_CR",
            "layer": "SETTLED",
            "direction": "DEBIT",
            "account": { "name": "Alicia" },
            "amount": { "formatted": "€2.0145" }
          }
        ]
      }
    }
  }
}
```

## transactions
Select one or more transactions. Specify the index to use and apply filters to your query.
#### Resolves to
[`TransactionConnection!`](/docs/reference/graphql/types/object#transaction-connection)
#### Arguments

---
* ``index`` - [`TransactionIndexInput!`](/docs/reference/graphql/types/input#transaction-index-input)
* Select from a list of pre-defined indexes. For optimal performance, choose specific indexes on unique fields over more general ones.
---
* ``where`` - [`TransactionFilterInput`](/docs/reference/graphql/types/input#transaction-filter-input)
* Filter the query according to specified conditions. Depending on the index chosen, different filters will be allowed.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

**Request**

```graphql
query GetTransactions($journalGLId: String!) {
  transactions(
    index: { name: CORRELATION_ID }
    where: {
      correlationId: { eq: "4f2ac9a7-5e83-458b-a194-c8ac8d8fdcd5" }
      journalId: { eq: $journalGLId }
    }
    first: 10
  ) {
    nodes {
      transactionId
      description
      effective
      tranCode {
        code
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "transactions": {
      "nodes": [
        {
          "transactionId": "114a8b1e-d00b-4e13-ab27-ec3472622c0a",
          "description": "Card authorization hold placed for 4.53 USD",
          "effective": "2022-09-10",
          "tranCode": { "code": "CARD_HOLD" }
        },
        {
          "transactionId": "d94033a4-f438-4fcc-9c3b-c7adf3fd7b76",
          "description": "Card TX for 4.53 USD settled.",
          "effective": "2022-09-12",
          "tranCode": { "code": "CARD_TX_CLEARING" }
        }
      ]
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
## velocity
Search for the velocity balance for an Account or Account Set.
#### Resolves to
[`[VelocityBalance]`]($gql:object:VelocityBalance)
#### Arguments

---
* ``accountId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Account or Account Set to search for velocity.
---
* ``window`` - [`JSON!`](/docs/reference/graphql/types/scalar#json)
* The window of the balance to look up. If
  `velocityLimitId` not provided, will look up
  all velocity limits that support the defined
  window. _Example:_ ``{year: "2022", month:"9"}``
---
* ``currency`` - [`CurrencyCode!`](/docs/reference/graphql/types/scalar#currency-code)
* The currency for the velocity to look up. _Default:_ ``"USD"``
---
* ``velocityLimitId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* If provided, retrieve this specific velocity limit.
---
* ``journalId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* If provided, retrieve from specified journal. Otherwise will use default.

## velocityControl
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

## velocityControls
#### Resolves to
[`VelocityControlConnection`](/docs/reference/graphql/types/object#velocity-control-connection)
#### Arguments

---
* ``index`` - [`VelocityControlIndexInput!`](/docs/reference/graphql/types/input#velocity-control-index-input)
*
---
* ``where`` - [`VelocityControlFilterInput`](/docs/reference/graphql/types/input#velocity-control-filter-input)
*
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. _Default:_ ``100``
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## velocityLimit
#### Resolves to
[`VelocityLimit`](/docs/reference/graphql/types/object#velocity-limit)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

## velocityLimits
#### Resolves to
[`VelocityLimitConnection`](/docs/reference/graphql/types/object#velocity-limit-connection)
#### Arguments

---
* ``index`` - [`VelocityLimitIndexInput!`](/docs/reference/graphql/types/input#velocity-limit-index-input)
*
---
* ``where`` - [`VelocityLimitFilterInput`](/docs/reference/graphql/types/input#velocity-limit-filter-input)
*
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. _Default:_ ``100``
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

## view
Get entries from a specific view by name.
#### Resolves to
[`ViewRecordConnection!`](/docs/reference/graphql/types/object#view-record-connection)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Name of the view to query.
---
* ``where`` - [`ViewFilter`](/docs/reference/graphql/types/input#view-filter)
* Filters to apply based on the view's dimensions.
---
* ``first`` - [`Int!`](/docs/reference/graphql/types/scalar#int)
* Number of nodes to return on the connection.
---
* ``after`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Cursor indicating the start point to retrieve nodes. When no cursor is provided, the query uses the default starting cursor.

## warehouse
Queries in the `warehouse` namespace are used to perform reads against the twisp data warehouse
### describeStatement
#### Resolves to
[`DescribeStatementOutput`](/docs/reference/graphql/types/object#describe-statement-output)
#### Arguments

---
* ``input`` - [`DescribeStatementInput!`](/docs/reference/graphql/types/input#describe-statement-input)
*

### describeTable
#### Resolves to
[`DescribeTableOutput`](/docs/reference/graphql/types/object#describe-table-output)
#### Arguments

---
* ``input`` - [`DescribeTableInput!`](/docs/reference/graphql/types/input#describe-table-input)
*

### export
#### Resolves to
[`Export`](/docs/reference/graphql/types/object#export)
#### Arguments

---
* ``id`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

### getStatementResult
#### Resolves to
[`GetStatementResultOutput`](/docs/reference/graphql/types/object#get-statement-result-output)
#### Arguments

---
* ``input`` - [`GetStatementResultInput!`](/docs/reference/graphql/types/input#get-statement-result-input)
*

### listDatabases
#### Resolves to
[`ListDatabasesOutput`](/docs/reference/graphql/types/object#list-databases-output)
#### Arguments

---
* ``input`` - [`ListDatabasesInput!`](/docs/reference/graphql/types/input#list-databases-input)
*

### listSchemas
#### Resolves to
[`ListSchemasOutput`](/docs/reference/graphql/types/object#list-schemas-output)
#### Arguments

---
* ``input`` - [`ListSchemasInput!`](/docs/reference/graphql/types/input#list-schemas-input)
*

### listStatements
#### Resolves to
[`ListStatementsOutput`](/docs/reference/graphql/types/object#list-statements-output)
#### Arguments

---
* ``input`` - [`ListStatementsInput!`](/docs/reference/graphql/types/input#list-statements-input)
*

### listTables
#### Resolves to
[`ListTablesOutput`](/docs/reference/graphql/types/object#list-tables-output)
#### Arguments

---
* ``input`` - [`ListTablesInput!`](/docs/reference/graphql/types/input#list-tables-input)
*

**Request**

```graphql
query listTables {
  warehouse {
    listTables(
      input: { maxResults: 5, database: "twisp", schemaPattern: "public" }
    ) {
      tables {
        name
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "warehouse": {
      "listTables": {
        "tables": [
          {
            "name": "account_history"
          },
          {
            "name": "accountcontext_history"
          },
          {
            "name": "accountset_history"
          },
          {
            "name": "accountsetmember_history"
          },
          {
            "name": "backfilljob_history"
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{}
```
## workflow
### execution
Return the execution by execution id.
#### Resolves to
[`WorkflowExecution`](/docs/reference/graphql/types/object#workflow-execution)
#### Arguments

---
* ``executionId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.
