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

[stellate] nftEntities - implement some kind of NullType #263

Open
yangwao opened this issue Apr 2, 2024 · 7 comments
Open

[stellate] nftEntities - implement some kind of NullType #263

yangwao opened this issue Apr 2, 2024 · 7 comments

Comments

@yangwao
Copy link
Member

yangwao commented Apr 2, 2024

To improve cache at Stellate

image

@vikiival
Copy link
Member

vikiival commented Apr 2, 2024

Hello @yangwao,
Can your colleague - guess @preschian give the parameters that were used?

Null entity

We can do custom resolvers, nftentites is a native query

where to improve

Currently our frontend is abusing indexer with bad queries

@preschian
Copy link
Member

This one is mostly coming from Novawallet. ref: https://github.com/kodadot/ops-internal/issues/1460#issuecomment-2015283988

@vikiival
Copy link
Member

vikiival commented Apr 3, 2024

IMG_0670

Also this one ?

[
  {
    "message": "Variable \"$orderBy\" got invalid value \"volume_DESC,supply_ASC\"; Value \"volume_DESC,supply_ASC\" does not exist in \"CollectionEntityOrderByInput\" enum. Did you mean the enum value \"volume_DESC_NULLS_LAST\"?",
    "extensions": {
      "code": "BAD_USER_INPUT",
      "exception": {
        "stacktrace": [
          "GraphQLError: Variable \"$orderBy\" got invalid value \"volume_DESC,supply_ASC\"; Value \"volume_DESC,supply_ASC\" does not exist in \"CollectionEntityOrderByInput\" enum. Did you mean the enum value \"volume_DESC_NULLS_LAST\"?",
          "    at /squid/node_modules/graphql/execution/values.js:116:15",
          "    at coerceInputValueImpl (/squid/node_modules/graphql/utilities/coerceInputValue.js:131:9)",
          "    at coerceInputValueImpl (/squid/node_modules/graphql/utilities/coerceInputValue.js:54:14)",
          "    at coerceInputValueImpl (/squid/node_modules/graphql/utilities/coerceInputValue.js:78:13)",
          "    at coerceInputValue (/squid/node_modules/graphql/utilities/coerceInputValue.js:37:10)",
          "    at _loop (/squid/node_modules/graphql/execution/values.js:109:69)",
          "    at coerceVariableValues (/squid/node_modules/graphql/execution/values.js:121:16)",
          "    at getVariableValues (/squid/node_modules/graphql/execution/values.js:50:19)",
          "    at buildExecutionContext (/squid/node_modules/graphql/execution/execute.js:203:61)",
          "    at validate (/squid/node_modules/@subsquid/openreader/lib/util/execute.js:70:51)"
        ]
      }
    }
  }
]

@preschian
Copy link
Member

That one is a different case. You can check on the "Insights" tab from the dashboard.

This compares all requests vs smartphones only on ahk one day.

all request smartphone only
Capture-2024-04-03-163327 Capture-2024-04-03-163400

Please see how many "Passes" requests are different. Most of them come from Novawallet.

Capture-2024-04-03-163842

@preschian
Copy link
Member

How to reproduce:

Return empty results always "PASS"
Screenshot 2024-04-03 at 18 03 59

From the chat above, there are two workarounds.

  1. Fix it on our side by implementing NullType
  2. Fix it on the client side by extending the queries. Example:
Screenshot 2024-04-03 at 18 07 27

@vikiival
Copy link
Member

vikiival commented Apr 3, 2024

{ 
  "currentOwner_eq": ""
}

That should be never called :),
Guess some composable is calling query like this

@preschian
Copy link
Member

That should be never called :),

that one is only for example. You can change that with another address that doesn't have nft will get the same results

Screenshot 2024-04-03 at 18 52 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants