• Alex Kalderimis's avatar
    Add offset paginated relation · e8b0d6c5
    Alex Kalderimis authored
    This separates out the responsibility of pagination from the relation,
    and is necessary to test resolvers using `Resolver.single` if they
    return an offset paginated relation.
    
    The reason for this is that the `single` resolver calls `super.first`
    (more or less), but on a connection, `#first` is the value of the
    `first:` argument, not the first item in the collection.
    
    For `BaseResolver.single` to work correctly with offset pagination, we
    need to return `relations` from `resolve`, not connections.
    e8b0d6c5
connections_spec.rb 2.71 KB