GetPositions
Position Queries
There are two primary queries available for retrieving Position
data:
GetPositions
: Retrieves a collection of positions based on specified filters and parametersGetPosition
: Fetches a single position by its unique identifier (id
)
We have additional Position
queries in our GraphQL package.
Positions
GetPositions
# Main pagination query
query GetPositions(
$where: positions_bool_exp
) {
total: positions_aggregate(where: $where) {
aggregate {
count
sum {
shares
}
}
}
positions(where: $where) {
id
account {
id
label
image
}
vault {
id
atom {
id
label
image
}
triple {
id
vault {
id
position_count
positions_aggregate {
aggregate {
sum {
shares
}
}
}
}
counter_vault {
id
position_count
positions_aggregate {
aggregate {
sum {
shares
}
}
}
}
subject {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
predicate {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
object {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
}
}
shares
vault_id
}
}
Interact with this query in Apollo Sandbox
GetPosition
query GetPosition($positionId: String!) {
position(id: $positionId) {
id
account {
id
label
image
}
vault {
id
atom {
id
label
image
}
triple {
id
vault {
id
position_count
positions_aggregate {
aggregate {
sum {
shares
}
}
}
}
counter_vault {
id
position_count
positions_aggregate {
aggregate {
sum {
shares
}
}
}
}
subject {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
predicate {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
object {
data
id
label
image
emoji
type
value {
person {
name
image
description
url
}
thing {
name
image
description
url
}
organization {
name
image
description
url
}
}
creator {
label
image
id
atom_id
type
}
}
}
}
shares
vault_id
}
}
# Variables
{
"positionId": "13-0x000ddc0e1bbfd22d2f0909d4638fec62aafea106" // change to the positionId you want to query
}