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
Currently, applying filtering and sorting logic directly within a DataLoader is not straightforward. While we can pass PagingArguments, there's no built-in way to access the IFilterContext or a similar ISortingContext within the DataLoader's logic. This limits the ability to create truly dynamic and encapsulated data fetching strategies.
The solution you'd like
The ideal solution would be to allow IFilterContext and potentially ISortingContext (or similar context objects) to be injected as parameters into DataLoader methods. This would enable us to directly leverage the filtering and sorting capabilities provided by Hot Chocolate within the data fetching logic itself, making DataLoaders more flexible and powerful.
Current Situation:
Currently, we are limited to passing PagingArguments to DataLoader methods. Attempting to directly use IFilterContext within the resolver and then passing data to the DataLoader doesn't result in the filter being applied at the data fetching level.
ty01314
changed the title
Enhance IFilterContext to Support IDataLoader returning ILookup
Enhance DataLoader Flexibility by Allowing Access to Filtering and Sorting Contexts or custom variable
Jan 5, 2025
Product
Hot Chocolate
Is your feature request related to a problem?
Currently, applying filtering and sorting logic directly within a DataLoader is not straightforward. While we can pass PagingArguments, there's no built-in way to access the IFilterContext or a similar ISortingContext within the DataLoader's logic. This limits the ability to create truly dynamic and encapsulated data fetching strategies.
The solution you'd like
The ideal solution would be to allow IFilterContext and potentially ISortingContext (or similar context objects) to be injected as parameters into DataLoader methods. This would enable us to directly leverage the filtering and sorting capabilities provided by Hot Chocolate within the data fetching logic itself, making DataLoaders more flexible and powerful.
Current Situation:
Currently, we are limited to passing PagingArguments to DataLoader methods. Attempting to directly use IFilterContext within the resolver and then passing data to the DataLoader doesn't result in the filter being applied at the data fetching level.
Code:
The text was updated successfully, but these errors were encountered: