Skip to content

Conversation

dseeto
Copy link
Contributor

@dseeto dseeto commented Sep 19, 2023

Description

Adds back the errors?: GraphQLError[]; key/value to the response object when rawRequest: true. This feature was added to graphql-request in this change as part of supporting error policies.

For context, this was previously already added, but was removed as the addition predated the implementation in graphql-request linked above.

Related #183

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Update the snapshots used in graphql-request-spec.ts contain the expected errors? key

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation N/A
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules N/A

@changeset-bot
Copy link

changeset-bot bot commented Sep 19, 2023

🦋 Changeset detected

Latest commit: e5f49fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/typescript-graphql-request Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dseeto
Copy link
Contributor Author

dseeto commented Sep 19, 2023

@saihaj @n1ru4l PTAL or please help tag the relevant maintainer. Builds are currently also failing due to #383.

@saihaj
Copy link
Collaborator

saihaj commented Sep 19, 2023

@saihaj @n1ru4l PTAL or please help tag the relevant maintainer. Builds are currently also failing due to #383.

Yeah I wanted to fix this last week but haven't gotten around it. This week at GraphQL Conf. So hopefully can resolve it when I am home next week

@saihaj
Copy link
Collaborator

saihaj commented Sep 25, 2023

Hey @dseeto can you sync your PR with main and see if that resolves failing build issues?

@saihaj saihaj added the waiting-for-answer Waiting for answer from author label Sep 25, 2023
@dseeto
Copy link
Contributor Author

dseeto commented Sep 25, 2023

@saihaj merged. Looks like the Github Testing action says it needs approval from maintainer in order to run.

@saihaj saihaj removed the waiting-for-answer Waiting for answer from author label Sep 25, 2023
@dseeto
Copy link
Contributor Author

dseeto commented Sep 25, 2023

Sorry for the back and forth, looks like types.urql.tsx was outdated. Ran yarn generate:examples to regenerate.

@saihaj
Copy link
Collaborator

saihaj commented Sep 25, 2023

@dseeto can you run yarn generate:examples and commit the changes. I think dev-tests need to be updated for this change

@saihaj saihaj added waiting-for-answer Waiting for answer from author and removed waiting-for-answer Waiting for answer from author labels Sep 25, 2023
@saihaj
Copy link
Collaborator

saihaj commented Sep 25, 2023

thank you @dseeto

@saihaj saihaj merged commit 5d5efe2 into dotansimha:main Sep 25, 2023
@dseeto dseeto deleted the rawRequestError branch September 25, 2023 18:17
saihaj added a commit that referenced this pull request Sep 25, 2023
* feat (msw) withSuffix param

* edit (msw) package version increasement

* add changeset

* Revert "chore(release): update monorepo packages versions (#349)" (#411)

This reverts commit dd930f7.

* Revert "fix(preset/near-operation-file): accept skipDocumentsValidation config parameter. Closes #214 (#383)" (#413)

This reverts commit 9a692da.

* chore(deps): update dependency jest-junit to v16 (#357)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency rimraf to v5 (#325)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(typescript-rtk-query): add addTransformResponse to config (#267)

* feat: add addTransformResponse to config

* docs: add changeset

* fix: changeset from path to minor

* fix: move subscription block before generation

* fix: prettier issue

---------

Co-authored-by: Dominic <dominic@nomanini.com>

* changes to dev tests

* fix(preset/near-operation-file): accept skipDocumentsValidat (#414)

* Revert "Revert "fix(preset/near-operation-file): accept skipDocumentsValidation config parameter. Closes #214 (#383)" (#413)"

This reverts commit 5739a0e.

* fix(preset/near-operation-file): read skipDocumentsValidation from config (#409)

* fix(preset/near-operation-file): add skipDocumentsValidation presetConfig types

* Create brave-bulldogs-explode.md

* fix(preset/near-operation-file): read skipDocumentsValidation from config

* Update brave-bulldogs-explode.md

* Delete .changeset/brave-bulldogs-explode.md

---------

Co-authored-by: Herman Bilous <herman.belous@gmail.com>

* chore(deps): update dependency patch-package to v8 (#417)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @urql/introspection to v1.0.2 (#321)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(graphql-request): return errors in return type for rawRequest (#408)

* fix(graphql-request): return errors in return type when rawRequest is true

* add changeset

* generate examples

* chore(deps): update typescript-eslint monorepo to v5.62.0 (#288)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @apollo/client to v3.8.4 (#292)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update babel monorepo (#299)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @changesets/cli to v2.26.2 (#310)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency lint-staged to v14 (#416)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @reduxjs/toolkit to v1.9.6 (#346)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update package.json

---------

Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dominic Gunther Bauer <46312751+DominicGBauer@users.noreply.github.com>
Co-authored-by: Dominic <dominic@nomanini.com>
Co-authored-by: Herman Bilous <herman.belous@gmail.com>
Co-authored-by: dseeto <dseeto@users.noreply.github.com>
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