Skip to content

Looking for a cleaner way to get a count of items matching my query #441

Answered by tywalch
dbudwin asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @dbudwin 👋

Firstly, I want to mention the execution option { ignoreOwnership: true }, which will remove filters added by ElectroDB to help isolate items in some types of queries. ElectroDB internally manages two fields similar to __typename, and this option removes checks for these fields (which your items naturally won't have).

Now to your questions:

  1. Is using raw okay here? Feels a little icky to me.

Raw is an escape hatch for things like this that don't have a proper implementation yet. I started a branch locally to change the response typing on { data: "raw" } but hit a few sticking points tonight.

  1. Can I get better type hinting so I don't need the eslint ignore comments?
  2. Is t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dbudwin
Comment options

Answer selected by dbudwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants