Skip to content

Conversation

@QQism
Copy link
Contributor

@QQism QQism commented May 25, 2022

When the GraphQL response has nested errors, graphlient does not raise
the ExcutionError which is not expected. This commit will check all
errors (including nested one) by using errors.all and make sure the
exception is raised.

Some considerations:

  • Should we use the Graphlient::Errors::ExecutionError for partial
    success response or create a new type of exception to maintain
    backward compatibility? I tend to think having one type of exception
    could make things simpler for usage.
  • Should graphlient ignore nested errors and not raise exception?
    Apparently, the whole point of this commit is about it. I'm working on
    a sensitive GraphQL client app, and any type of errors should be well
    aware to proceed to the appropriate next step.

References:

@dblock
Copy link
Collaborator

dblock commented May 25, 2022

Ugh travis-ci is MIA.

Care to PR a quick replacement for it with GHA so we can have a working CI?

@QQism
Copy link
Contributor Author

QQism commented May 27, 2022

Ugh travis-ci is MIA.

Care to PR a quick replacement for it with GHA so we can have a working CI?

Yes. Please check out #89

@QQism QQism force-pushed the qq/fix/partial-success-response branch from afb80e7 to 048159e Compare May 27, 2022 00:41
@QQism QQism force-pushed the qq/fix/partial-success-response branch 2 times, most recently from e95b71d to 11a026d Compare June 10, 2022 08:02
@dblock
Copy link
Collaborator

dblock commented Jun 11, 2022

Update the CHANGELOG please and we're good to go! Thanks.

When the GraphQL response has nested errors, `graphlient` does not raise
the `ExcutionError` which is not expected. This commit will check all
errors (including nested one) by using `errors.all` and make sure the
exception is raised.

Some considerations:
- Should we use the `Graphlient::Errors::ExecutionError` for partial
  success response or create a new type of exception to maintain
  backward compatibility? I tend to think having one type of exception
  could make things simpler for usage.
- Should `graphlient` ignore nested errors and not raise exception?
  Apparently, the whole point of this commit is about it. I'm working on
  a sensitive GraphQL client app, and any type of errors should be well
  aware to proceed to the appropriate next step.

References:
- https://github.com/github/graphql-client/pull/132#issuecomment-386111906
@QQism QQism force-pushed the qq/fix/partial-success-response branch from 11a026d to 808a149 Compare June 11, 2022 05:00
@dblock dblock merged commit 6bfa06a into ashkan18:master Jun 11, 2022
@dblock
Copy link
Collaborator

dblock commented Jun 11, 2022

I released 0.6.0.

@dblock
Copy link
Collaborator

dblock commented Jun 11, 2022

@QQism if you have spare cycles, #65 is unfinished and could use some ❤️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants