Skip to content
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

(graphql) add sorter and filter for Smart Contract list #675

Closed
Naupio opened this issue Jun 30, 2022 · 7 comments
Closed

(graphql) add sorter and filter for Smart Contract list #675

Naupio opened this issue Jun 30, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Naupio
Copy link
Contributor

Naupio commented Jun 30, 2022

No description provided.

@Naupio Naupio self-assigned this Jun 30, 2022
@Naupio
Copy link
Contributor Author

Naupio commented Jun 30, 2022

- [ ] sorted by balance

  • sorted by tx count
  • sorted by id
  • sorted by name

@Naupio Naupio added the enhancement New feature or request label Jul 1, 2022
@Naupio Naupio changed the title (v1.1) add sorter for Contract list (v1.1) add sorter and filter for Contract list Jul 1, 2022
@Keith-CY Keith-CY moved this to In Progress in Nervos Wallet/Explorer Jul 6, 2022
@Keith-CY Keith-CY added this to the 2022/07/06 - 2022/07/13 milestone Jul 6, 2022
@Naupio Naupio changed the title (v1.1) add sorter and filter for Contract list (graphql) add sorter and filter for Contract list Jul 7, 2022
@Naupio Naupio moved this from In Progress to QA in Nervos Wallet/Explorer Jul 14, 2022
@Naupio
Copy link
Contributor Author

Naupio commented Jul 18, 2022

example:

    query {
      smart_contracts(
        input: { sorter: [{ sort_type: DESC, sort_value: EX_TX_COUNT }] }
      ) {
        entries {
          name
          account_id
          account {
            eth_address
            transaction_count
          }
        }
        metadata {
          total_count
          after
          before
        }
      }
    }

{
  "data": {
    "smart_contracts": {
      "entries": [
        {
          "account": {
            "eth_address": "0x2503a1a79a443f3961ee96a8c5ec513638129614",
            "transaction_count": 33
          },
          "account_id": "6841",
          "name": "EIP20"
        }
      ],
      "metadata": {
        "after": null,
        "before": null,
        "total_count": 1
      }
    }
  }
}

@Naupio
Copy link
Contributor Author

Naupio commented Jul 18, 2022

add new sorter field for input object
@Keith-CY

@Naupio
Copy link
Contributor Author

Naupio commented Jul 18, 2022

restful api use rpc to fetch ckb balance for responses , so doesn’t implement balance sorter for graphql query

@FrederLu
Copy link

Image
Image
@Naupio
There are 2 pieces of data on the page. The interface output parameter displays one piece of data. Is the second piece of data filtered?

@Keith-CY
Copy link
Member

Not used in front-end yet

@Naupio
Copy link
Contributor Author

Naupio commented Jul 20, 2022

Image Image @Naupio There are 2 pieces of data on the page. The interface output parameter displays one piece of data. Is the second piece of data filtered?

I check the source database table, the new record was exist now,
image

@Naupio Naupio changed the title (graphql) add sorter and filter for Contract list (graphql) add sorter and filter for Smart Contract list Jul 21, 2022
@FrederLu FrederLu moved this from QA to Production in Nervos Wallet/Explorer Jul 25, 2022
@FrederLu FrederLu moved this from Production to Done in Nervos Wallet/Explorer Jul 26, 2022
Repository owner moved this from Done to Production in Nervos Wallet/Explorer Jul 27, 2022
@Keith-CY Keith-CY moved this from Production to Done in Nervos Wallet/Explorer Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants