Skip to content

Commit

Permalink
Patched examples with new values
Browse files Browse the repository at this point in the history
  • Loading branch information
gzigzigzeo committed Jul 3, 2019
1 parent d2c295d commit 8c0de88
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ query {
sequenceNumber
balances {
asset {
id
code
native
issuer { id }
}
balance
Expand Down Expand Up @@ -172,8 +172,6 @@ query {
}
```

*NOTE*: Please note that native balance is returned inside a trustline too, and is marked with the boolean flag.

## Subscriptions

The most exciting and powerful feature of Astrograph is subscriptions.
Expand Down Expand Up @@ -226,9 +224,9 @@ subscription {
account { id }
values {
asset {
id
code
issuer { id }
native
}
balance
}
Expand Down
3 changes: 2 additions & 1 deletion examples/balance-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ client
balance
limit
asset {
id
code
issuer { id }
}
Expand All @@ -37,6 +38,6 @@ client
})
.then((result: { data: any }) => {
for (const t of result.data.account.balances) {
console.log("Balance", t.balance, t.id, "with limit", t.limit);
console.log("Balance", t.balance, t.asset.id, "with limit", t.limit);
}
});
4 changes: 3 additions & 1 deletion examples/balance-monitor-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ const SUBSCRIPTION = gql`
}
mutationType
asset {
id
code
issuer { id }
}
values {
asset {
id
code
issuer { id }
}
Expand Down Expand Up @@ -69,7 +71,7 @@ apolloClient

console.log(
"New balance for",
values.id,
values.asset.id,
"is now",
values.balance,
"with limit",
Expand Down

0 comments on commit 8c0de88

Please sign in to comment.