forked from cerebris/jsonapi-resources
-
Notifications
You must be signed in to change notification settings - Fork 1
Update to version 10 for performance enhancements #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wanyamaman
wants to merge
172
commits into
kloeckner-i:master
Choose a base branch
from
cerebris:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…for-nested-resources-but-not-includes Allow pagination for nested resources but not for included resources
…s_in_relationships Added support for :primary_key in sorting on relationships
…ormatting added optional route formatting feature
…siting-relationships Allow to post existing relationships
Works around primary key being cast due to pluck bug
Use `destroy` instead of `delete` to ensure callbacks are run
Update ruby and rails versions for travis tests
Replaces `allow_includes` with `default_allow_include_to_one` and `default_allow_include_to_many` configuration options. Adds support for `allow_include` option on Relationships to override the config settings.
Allows the processor to retrieve records without further filtering, which will have taken place earlier in the `find_fragments` and `find_related_fragments`. This fixes issues where `records` has been overridden and interferes with getting included records (and already filtered by the find fragment step).
Introduce `Resource.retrieve_records`
Allow more control over allowing includes
Needed to avoid "DEPRECATION WARNING: Dangerous query method..." See rails/rails#32995
Wrap pluck fields with Arel.sql
# Summarize changes in around 50 characters or less
Use inclusive terminology
Update license copyright years
…t sql statement order
…r operations callbacks
Rework request
Relationship objects are used as key in @join_details in JoinManager. This hash contains two types of objects: String and Relationship In case of hash collisions in @join_details the method Relationship#eql? is called. It currently fails when comparing with a string key. Fixes #1333
Update version to v0.11.0.beta1
Have Resource#inherited call through to Class#inherited
Fix JSONAPI::PathSegment::Relationship#eql?
* Rails v6.1 compatibility (#1346) * Fixes for rails 6.1.1 * Fixes for ruby 3.0.0 * Remove rails 5.0 support Co-authored-by: Igor Gonchar <[email protected]>
…eding to understand the internal components (#1348) * Refactor to allow resources to be serialized without the developer needing to understand the internal components * Simplify and clarify naming for internal components * Refine include_directives
* Remove code specifically for pre 5.1 rails versions * Update rails version supported
…rated SQL strings (#1363) * Refine when config.active_record.sqlite3.represent_boolean_as_integer is set Tests with rails > 6.1.1 breaks with this option * Update rails 6.1 tested version * Add quoting for fields in built up sql * Remove tests for generated sql statements These are changing with new rails versions and it's creating a lot of false failures * Remove tests for generated sql statements using joins_left * Fix default sort for when empty array is provided Fixes issue with relationship requests not getting a default sort * Add helper methods for generating sql fields with aliases and quotes
JSONAPI::ResourceTree#load_included was failing to correctly populate the resource fragments of included resources, such that the `include_related` parameter was null. This was resulting in the relationships object lacking a data attribute for nil or empty resources. The JSON-API specification states that a null or empty array should be returned in these circumstances: https://jsonapi.org/format/#document-resource-object-linkage The underlying issue appears to be the use of `include_related` rather than the symbol `:include_related` when initializing nested resource fragments.
Deprecates content_type in favor of media_type
* Add Ruby 3.1 and Rails 7 to the CI matrix * Adding Ruby 3.2 * Bump up patch versions
for efficient string storage since we don't mutate any of the string literals after they have been declared. in essence, they're already being used as frozen values.
You have a configuration option`allow_transactions`, but looks like implementation is missing.
When the user adds a join in `records`, it confuses `get_join_arel_node` because it finds the same number of joins before & after adding a join for `include_optional_linkage_data` (or equivalently for `always_include_*_linkage_data`). This commit falls back to searching the existing arel nodes for a compatible join and uses that if found.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Test Plan:
Reviewer Checklist: