Skip to content

No data in GraphQL::Pro::Defer::Deferral::to_h when errors are present #5365

@boazreicher

Description

@boazreicher

The to_h method of GraphQL::Pro::Defer::Deferral does not return any data when errors are present.

This seems to contradict the docs which say .to_h returns a hash with path:, data:, and/or errors: (tbf, the comment in the method signature is more clear/explicit: @return [Hash] with 'path:', either 'errors:' or 'data:', and 'label:', if given.)

It seems like it would be more useful to return both errors and data, and let the client code decide what to do with them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions