Skip to content

Commit 4077dec

Browse files
Updates the ApolloSandbox plugin to work with the new URL and schema
1 parent 1aa697d commit 4077dec

File tree

1 file changed

+39
-14
lines changed

1 file changed

+39
-14
lines changed

src/theme/MDXComponents/ApolloSandbox.js

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,60 @@ function SandboxContent() {
1818

1919
try {
2020
if (window.EmbeddedSandbox) {
21-
console.log('EmbeddedSandbox found');
2221
new window.EmbeddedSandbox({
2322
target: '#embedded-sandbox',
24-
initialEndpoint: 'https://api.i7n.app/v1/graphql',
23+
initialEndpoint: 'https://dev.base.intuition-api.com/v1/graphql',
2524
initialState: {
2625
document: `query GetAtoms($limit: Int, $offset: Int, $orderBy: [atoms_order_by!], $where: atoms_bool_exp) {
26+
atoms_aggregate(where: $where) {
27+
aggregate {
28+
count
29+
}
30+
}
2731
atoms(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {
28-
data
32+
# AtomMetadata fields
2933
id
3034
image
3135
label
3236
emoji
3337
type
34-
blockNumber
35-
blockTimestamp
36-
transactionHash
37-
creatorId
38-
vaultId
39-
walletId
40-
vault {
41-
positionCount
42-
totalShares
43-
currentSharePrice
44-
}
38+
wallet_id
4539
creator {
4640
id
4741
label
4842
image
4943
}
44+
45+
# AtomTxn fields
46+
block_number
47+
block_timestamp
48+
transaction_hash
49+
creator_id
50+
51+
# AtomVaultDetails fields
52+
vault_id
53+
wallet_id
54+
vault {
55+
position_count
56+
total_shares
57+
current_share_price
58+
positions_aggregate {
59+
aggregate {
60+
count
61+
sum {
62+
shares
63+
}
64+
}
65+
}
66+
positions {
67+
id
68+
account {
69+
label
70+
id
71+
}
72+
shares
73+
}
74+
}
5075
}
5176
}`,
5277
variables: {},

0 commit comments

Comments
 (0)