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 an enchancement that will surely break compatibility but it will be a solution to problem with deciding which method should have access to which of this basic data structures.
Because there is always single resource instance on given route no state can be stored in this object between method calls. This means that all required data must be always passed to each method that requires it. Because of that graceful needs to make very opinionated decision about what is available on each step of processing the request. Although this helps developer to focus on what is important in specific method handler (e.g., retrieve, list, create in generic views) it is very hard to extend if something non usual needs to be done - often it requires overriding of many methods.
We could also consider if this context could be passed to serialisers so more complex things could be done like: field serialisation that depends on query string parameters.
The text was updated successfully, but these errors were encountered:
This is an enchancement that will surely break compatibility but it will be a solution to problem with deciding which method should have access to which of this basic data structures.
Because there is always single resource instance on given route no state can be stored in this object between method calls. This means that all required data must be always passed to each method that requires it. Because of that
graceful
needs to make very opinionated decision about what is available on each step of processing the request. Although this helps developer to focus on what is important in specific method handler (e.g., retrieve, list, create in generic views) it is very hard to extend if something non usual needs to be done - often it requires overriding of many methods.We could also consider if this context could be passed to serialisers so more complex things could be done like: field serialisation that depends on query string parameters.
The text was updated successfully, but these errors were encountered: