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

Added support for Mongoid 5, 6 and 7 relations #1754

Merged
merged 1 commit into from Aug 9, 2018

Conversation

2 participants
@dblock
Copy link
Contributor

dblock commented Aug 8, 2018

Actually closes #938, enabling plain has_many and similar relations to be used as relay connection types. These are no longer Mongoid::Criteria since Mongoid 5.

@dblock dblock force-pushed the dblock:mongoid-relation-connections branch 2 times, most recently from c1dd54f to 300afbe Aug 8, 2018

@dblock dblock changed the title WIP: Added support for Mongoid 7 relation connections. WIP: Added support for Mongoid 5, 6 and 7 relations Aug 8, 2018

@dblock dblock force-pushed the dblock:mongoid-relation-connections branch from 300afbe to dfdde72 Aug 8, 2018

@dblock dblock changed the title WIP: Added support for Mongoid 5, 6 and 7 relations Added support for Mongoid 5, 6 and 7 relations Aug 8, 2018

@dblock

This comment has been minimized.

Copy link
Contributor

dblock commented Aug 8, 2018

💚 and ready to merge @rmosolgo

gem "jekyll-algolia"
gem "jekyll-redirect-from"
end

This comment has been minimized.

@dblock

dblock Aug 8, 2018

Contributor

Removed these blocks as in other gemfiles. The jekyll-algolia gem requires ruby 2.3.0, and graphql-ruby still tests with 2.2.8, so it was producing errors from the auto-generated appraisals. I suspect somone had removed these from the earlier rails version by hand, and they aren't necessary for the tests anyway.

@@ -482,4 +491,49 @@ def get_names(result, field_name)
connection = GraphQL::Relay::BaseConnection.connection_for_nodes(relation)
assert_equal GraphQL::Relay::MongoRelationConnection, connection
end

describe "relations" do
let(:query_string) {%|

This comment has been minimized.

@dblock

dblock Aug 8, 2018

Contributor

This one is quick and dirty. Happy to iterate on a smaller query if you care, but could use some help in writing one.

@rmosolgo

This comment has been minimized.

Copy link
Owner

rmosolgo commented Aug 9, 2018

🎊 This looks awesome, thanks for your work here!

@rmosolgo rmosolgo merged commit f85d230 into rmosolgo:master Aug 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rmosolgo rmosolgo added this to the 1.8.7 milestone Aug 9, 2018

@dblock dblock deleted the dblock:mongoid-relation-connections branch Aug 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment