So either can be used, but the query on index is preferred because a filter with scan will scan the entire database and then discard the items based on the filter, while the query will only query the items needed so the operation is less expensive in general.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you Nader this is a fantastic resource.
A bit late here in London, so I might be missing the obvious, but anyways here is a pedestrian question about item 14.
The same can be achieved by
listEmployees(filter: {jobTitle: {eq: "Manager"}})
with the benefit of being able to use filter with other operators. So what is the benefit of your approach? Is is performance mainly?
thanks
Petros
So either can be used, but the query on index is preferred because a filter with scan will scan the entire database and then discard the items based on the filter, while the query will only query the items needed so the operation is less expensive in general.