v0.26.0 #1060
doug-martin
started this conversation in
Releases
v0.26.0
#1060
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Additional Authorization Context
In
v0.26.0
@mwoelk added a new feature #1043 that passes additional context to authorizers.The new
AuthorizationContext
type contains the following informationBelow is a simple example of using the
authorizationContext
to allow all read requests to pass through, while any mutation will get an additional filter to ensure only records owned by the user are modified.Check out the docs to read more about the new feature!
Filter Only Fields
@mwoelk also added a new option to
@FilterableField
that allows exposing fields that can be used to filter results, but are not included in the result.To use the new feature all you need to do is set the
filterOnly
option totrue
You can check out the docs here
Set ManyToMany and OneToMany Relations
In previous versions of
nestjs-query
there was no way to easily set amanyToMany
oroneToMany
relation without calling bothadd
andremove
endpoints.In the latest version a new endpoint has been added to quickly set the relations.
Assuming the following
TodoItemDTO
A new end point call
setTagsOnTodoItems
is added that will remove and add relations in a single trip.If you set
relationIds
to an empty array all of the tags will be removedBeta Was this translation helpful? Give feedback.
All reactions