-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add search api of graphql #1234
feat: add search api of graphql #1234
Conversation
Pull Request Test Coverage Report for Build 48fb303facb49abd20ab27fc6e8bd39cfef58f65-PR-1234Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@Keith-CY @JeffreyMa597 we need discuss some feat of this PR. previously, we have in here, we add graphql api there a problem of using
cc @FrederLu |
query example of testnet-stg env query {
search_udt(input: { fuzzy_name: "%ERC%", limit: 1 }) {
entries {
id
name
symbol
type
contract_address_hash
}
metadata {
total_count
before
after
}
}
search_keyword(
input: { keyword: "%MSHKUUPS%" }
) {
type
id
}
} {
"data": {
"search_keyword": null,
"search_udt": {
"entries": [
{
"contract_address_hash": "0xfa5a662b13208070e665ac8239bff9ad6e78a020",
"id": 92081,
"name": "MSHK ERC721 UUPS Token",
"symbol": "MSHKUUPS",
"type": "NATIVE"
}
],
"metadata": {
"after": "g3QAAAABZAACaWRiAAFnsQ==",
"before": null,
"total_count": 808
}
}
},
"errors": [
{
"locations": [
{
"column": 3,
"line": 17
}
],
"message": "not_found",
"path": [
"search_keyword"
]
}
]
} |
@zmcNotafraid please have a review |
fix: erc20 udt return no minted_count
As mentioned in #618 (comment), if the keyword is the address of an uninitialized account, |
TL;DR; Before this feature, if an account hasn't sent a transaction, it will not be initialized on the chain and it will not be stored in the database of gwscan. So the API returns
If This feature changed the behavior of gwscan. Even if the account has not sent a transaction(only appears in
Now |
warning: change query {
account(input: {address: "0x59b670e9fa9d0a427751af201d676719a970857b"}){
... on Account{
type
eth_address
}
}
} query {
account(input: {address: "0x59b670e9fa9d0a427751af201d676719a970857e"}){
... on Address{
eth_address
}
}
} |
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
What problem does this PR solve?
warning: this pr depend on #1227
issue: #1231
add search api of graphql
example
keyword can be: udt name| account eth_address | address | transaction hash | block number
Check List
Test
Task