-
Notifications
You must be signed in to change notification settings - Fork 67
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Problems with filter in graphql playground #1254
Comments
Default host: aarch64-apple-darwin installed toolchainsbeta-3-aarch64-apple-darwin active toolchainlatest-aarch64-apple-darwin (default) fuels versionsforc : 0.43 |
An example of submitting a raw SQL query:
Let me know if this helps :) |
I have redeployed the indexer using that docker-compose file (added Trying to get some data from the server There are my logs: Server toolchain
|
After that query
|
SELECT COUNT(*) FROM swaygang_spark_indexer.orderentity; |
|
You want:
Output is: {"data":[]} |
Got it, that works, but the result is empty
But the GraphQL request is not empty
|
|
curl -X POST https://spark-indexer.spark-defi.com/api/sql/swaygang/spark_indexer \
-d '{"query":"select json_agg(t) from (select * from swaygang_spark_indexer.orderentity) t;"}' \
-H "Content-type: application/json" Response: {
"data" : [
[
{
"amount0" : 1000000000,
"amount1" : 300000000000,
"asset0" : "17e68049bb3cf21a85f00778fde367465bbd8263e8d4f8e47e533fe0df865658",
"asset1" : "eaa756f320f175f0023a8c9fc2c9b7a03ce8d715f04ac49aba69d2b7d74e70b8",
"fulfilled0" : 0,
"fulfilled1" : 0,
"id" : 1,
"matcher_fee" : 1000,
"matcher_fee_used" : 0,
"object" : "\\x0c000000000000000d0000000101000000000000000a000000014000000000000000313765363830343962623363663231613835663030373738666465333637343635626264383236336538643466386534376535333366653064663836353635381e0000000100ca9a3b000000000a000000014000000000000000656161373536663332306631373566303032336138633966633263396237613033636538643731356630346163343961626136396432623764373465373062381e0000000100b864d945000000090000000106000000000000004163746976651e0000000100000000000000001e00000001000000000000000000000000014000000000000000636363346639323439353336636638396162306633316262353266613036633030656130333837646361633538333039323465636635366632646465643361351e000000015881d264000000401e00000001e8030000000000001e000000010000000000000000",
"owner" : "ccc4f9249536cf89ab0f31bb52fa06c00ea0387dcac5830924ecf56f2dded3a5",
"status" : "Canceled",
"timestamp" : 4611686020118905176
},
{
"amount0" : 1000000000,
"amount1" : 300000000000,
"asset0" : "17e68049bb3cf21a85f00778fde367465bbd8263e8d4f8e47e533fe0df865658",
"asset1" : "eaa756f320f175f0023a8c9fc2c9b7a03ce8d715f04ac49aba69d2b7d74e70b8",
"fulfilled0" : 0,
"fulfilled1" : 0,
"id" : 2,
"matcher_fee" : 1000,
"matcher_fee_used" : 0,
"object" : "\\x0c000000000000000d0000000102000000000000000a000000014000000000000000313765363830343962623363663231613835663030373738666465333637343635626264383236336538643466386534376535333366653064663836353635381e0000000100ca9a3b000000000a000000014000000000000000656161373536663332306631373566303032336138633966633263396237613033636538643731356630346163343961626136396432623764373465373062381e0000000100b864d945000000090000000106000000000000004163746976651e0000000100000000000000001e00000001000000000000000000000000014000000000000000636363346639323439353336636638396162306633316262353266613036633030656130333837646361633538333039323465636635366632646465643361351e000000015582d264000000401e00000001e8030000000000001e000000010000000000000000",
"owner" : "ccc4f9249536cf89ab0f31bb52fa06c00ea0387dcac5830924ecf56f2dded3a5",
"status" : "Canceled",
"timestamp" : 4611686020118905429
},
{
"amount0" : 1000000000,
"amount1" : 300000000000,
"asset0" : "17e68049bb3cf21a85f00778fde367465bbd8263e8d4f8e47e533fe0df865658",
"asset1" : "eaa756f320f175f0023a8c9fc2c9b7a03ce8d715f04ac49aba69d2b7d74e70b8",
"fulfilled0" : 0,
"fulfilled1" : 0,
"id" : 3,
"matcher_fee" : 1000,
"matcher_fee_used" : 0,
"object" : "\\x0c000000000000000d0000000103000000000000000a000000014000000000000000313765363830343962623363663231613835663030373738666465333637343635626264383236336538643466386534376535333366653064663836353635381e0000000100ca9a3b000000000a000000014000000000000000656161373536663332306631373566303032336138633966633263396237613033636538643731356630346163343961626136396432623764373465373062381e0000000100b864d945000000090000000106000000000000004163746976651e0000000100000000000000001e00000001000000000000000000000000014000000000000000636363346639323439353336636638396162306633316262353266613036633030656130333837646361633538333039323465636635366632646465643361351e0000000188c0d364000000401e00000001e8030000000000001e000000010000000000000000",
"owner" : "ccc4f9249536cf89ab0f31bb52fa06c00ea0387dcac5830924ecf56f2dded3a5",
"status" : "Canceled",
"timestamp" : 4611686020118986888
},
{
"amount0" : 1000000000,
"amount1" : 300000000000,
"asset0" : "17e68049bb3cf21a85f00778fde367465bbd8263e8d4f8e47e533fe0df865658",
"asset1" : "eaa756f320f175f0023a8c9fc2c9b7a03ce8d715f04ac49aba69d2b7d74e70b8",
"fulfilled0" : 0,
"fulfilled1" : 0,
"id" : 4,
"matcher_fee" : 1000,
"matcher_fee_used" : 0,
"object" : "\\x0c000000000000000d0000000104000000000000000a000000014000000000000000313765363830343962623363663231613835663030373738666465333637343635626264383236336538643466386534376535333366653064663836353635381e0000000100ca9a3b000000000a000000014000000000000000656161373536663332306631373566303032336138633966633263396237613033636538643731356630346163343961626136396432623764373465373062381e0000000100b864d945000000090000000106000000000000004163746976651e0000000100000000000000001e00000001000000000000000000000000014000000000000000636363346639323439353336636638396162306633316262353266613036633030656130333837646361633538333039323465636635366632646465643361351e00000001f816d564000000401e00000001e8030000000000001e000000010000000000000000",
"owner" : "ccc4f9249536cf89ab0f31bb52fa06c00ea0387dcac5830924ecf56f2dded3a5",
"status" : "Canceled",
"timestamp" : 4611686020119074552
}
]
]
} |
Thank you very much ser, this is a big step for us. This request works for me. I'm going to go figure out how to make filters🫡 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
GM my indexer family
Finaly I have deployed my indexer in a docker compose, the playground is alive on
https://spark-indexer.spark-defi.com/api/playground/swaygang/spark_indexer
I'm trying to get buy and sell orders from graphql API, to do that I need to match 3 fields: status, asset0, asset1,
I'm using that query to fetch the data
and response is
"data": []
But if I moving filters that way
response will be like that
And asset0 is wrong in that response
Looks like only first filter line works
Please help me to figure out how to build request with
The text was updated successfully, but these errors were encountered: