Skip to content

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

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.

Activity

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

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