You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mostly a user training issue, but there is an aspect of intuition being violated here. Basically when users make requests for entries that they know are unique, they are getting hit with high costs on their operation because they neglected to include a paging parameter.
It would be nice to be able to annotate fields as being unique and thus an equality filter using them would mean the same thing as setting the page size to 1 for the purposes of cost calculation.
The solution you'd like
I am imagining something roughly like:
publicrecordBook([Unique]intBookId,string?Name);
would result in a state such that the cost of these two field resolvers are equal:
inputBooksFilterInput {
bookId: UniqueIntOperationFilterInput # ...
}
inputUniqueIntOperationFilterInput {
eq: Int # ... (everything in the base int filter)
}
DO not use filters to avoid creating specific lookups.
DO use filtering only if you have a client use case where you for instance have a grid and you need client-controlled filters.
DO use strict FilterInputTypes to only allow what is really needed by the client use-case.
In general in GraphQL you want to apply the YAGNI principal... You aint gonna need it.
Product
Hot Chocolate
Is your feature request related to a problem?
This is mostly a user training issue, but there is an aspect of intuition being violated here. Basically when users make requests for entries that they know are unique, they are getting hit with high costs on their operation because they neglected to include a paging parameter.
It would be nice to be able to annotate fields as being unique and thus an equality filter using them would mean the same thing as setting the page size to 1 for the purposes of cost calculation.
The solution you'd like
I am imagining something roughly like:
would result in a state such that the cost of these two field resolvers are equal:
Perhaps this involves a schema adjustment like:
Or maybe an annotation on the query field:
The text was updated successfully, but these errors were encountered: