query GetAccounts(
	$businessId: ID!
	$page: Int
	$pageSize: Int
	$types: [AccountTypeValue!]
	$subtypes: [AccountSubtypeValue!]
	$isArchived: Boolean
) {
	business(id: $businessId) {
		id
		accounts(
			page: $page
			pageSize: $pageSize
			types: $types
			subtypes: $subtypes
			isArchived: $isArchived
		) {
			edges {
				node {
					id
					name
					description
					displayId
					type {
						name
						value
					}
					subtype {
						name
						value
					}
					normalBalanceType
					currency {
						code
						symbol
					}
					balance
					balanceInBusinessCurrency
					isArchived
				}
			}
			pageInfo {
				currentPage
				totalPages
				totalCount
			}
		}
	}
}

query GetAccount($businessId: ID!, $accountId: ID!) {
	business(id: $businessId) {
		id
		account(id: $accountId) {
			id
			name
			description
			displayId
			type {
				name
				value
				normalBalanceType
			}
			subtype {
				name
				value
				archivable
				systemCreated
				description
			}
			normalBalanceType
			currency {
				code
				symbol
				name
			}
			balance
			balanceInBusinessCurrency
			isArchived
			sequence
		}
	}
}

query GetAccountTypes {
	accountTypes {
		name
		value
		normalBalanceType
	}
}

query GetAccountSubtypes {
	accountSubtypes {
		name
		value
		type {
			name
			value
		}
		archivable
		systemCreated
		description
	}
}
