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
Is your feature request related to a problem? Please describe.
Sort/filter types are always added by default in a GraphQL query by ash_graphql, but sometimes you want to implement your own sort/filter mechanism to limit what the users can do in your database (ex. restricting them from create not well optimized queries).
Describe the solution you'd like
I think there is two solutions here, it would be great to have both if possible.
The first one is to simply give an option to disable sort or filter types for an specific action.
The second one is to allow the user to customize these types for a specific option, for example, the user can say that what are the fields that the sort type can expose as sortable. That way I have the best of both words, I can restrict what fields can be filtered or sorted but still use the ash_graphql types so that is generated automatically for me instead of having to create a custom solution..
Express the feature either with a change to resource syntax, or with a change to the resource interface
For example
graphqldotype:propertyqueriesdolist:list_property,:readdo# Makes PropertySortField only contain 'updated_at', 'inserted_at' and 'id' fieldssort_by[:updated_at,:inserted_at,:id]# Makes PropertyFilterInput only filter by 'price', 'name' and 'address' fieldsfilter_by[:price,:name,:address]endendend
The text was updated successfully, but these errors were encountered:
Hey there! In the short term we can make the filter/sortability optional, but making it customizable per query would be a bit harder. I'll push up a resource-level toggle to turn those off, and then you can handle them yourself with arguments :)
Is your feature request related to a problem? Please describe.
Sort/filter types are always added by default in a GraphQL query by ash_graphql, but sometimes you want to implement your own sort/filter mechanism to limit what the users can do in your database (ex. restricting them from create not well optimized queries).
Describe the solution you'd like
I think there is two solutions here, it would be great to have both if possible.
The first one is to simply give an option to disable sort or filter types for an specific action.
The second one is to allow the user to customize these types for a specific option, for example, the user can say that what are the fields that the sort type can expose as sortable. That way I have the best of both words, I can restrict what fields can be filtered or sorted but still use the ash_graphql types so that is generated automatically for me instead of having to create a custom solution..
Express the feature either with a change to resource syntax, or with a change to the resource interface
For example
The text was updated successfully, but these errors were encountered: