Skip to content

Draft: [graphql] Fix resolver type connections

Brett Walker requested to merge bw-graphql-fixes into master

What does this MR do and why?

In 2.x of the graphql gem, the determination of whether a field considers itself is a connection has changed from

https://github.com/rmosolgo/graphql-ruby/blob/c4778ffcba5de34b05dfe1b63ce94a60201a5625/lib/graphql/schema/field.rb#L128-143

to

https://github.com/rmosolgo/graphql-ruby/blob/875575c145c01666a22bba4b9c1152c53d408473/lib/graphql/schema/field.rb#L129-144

By default, the new code looks at the @resolver_class.type. The changed files are expected to return a paginated connection, but if connection? is not detecting it properly, then the necessary pagination class is not added.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brett Walker

Merge request reports