Skip to content

Conversation

P4sca1
Copy link
Contributor

@P4sca1 P4sca1 commented Mar 22, 2022

Description

The errors property from the return type has been removed, because it is never
returned by graphql-request. Instead, failed requests throw a ClientError.
Also, data is no longer optional, because it always exists for successful responses.

Related #7592

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Existing snapshots have been updated.

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2022

🦋 Changeset detected

Latest commit: 5437075

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

@vercel
Copy link

vercel bot commented Mar 22, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/theguild/graphql-code-generator/6oEqubPMBfQ3JGss8N1peYLw4y1T
✅ Preview: https://graphql-code-generator-git-fork-p4sca1-fix-grap-1a410b-theguild.vercel.app

@charlypoly charlypoly merged commit 44cd9a8 into dotansimha:master Mar 22, 2022
@charlypoly
Copy link
Contributor

Released in @graphql-codegen/typescript-graphql-request@4.4.4, thank you @P4sca1 🚀

@nabeix
Copy link

nabeix commented Mar 26, 2022

@P4sca1 @charlypoly Hi, I tried v4.4.4 and I got the following error:

'GraphQLError' is declared but its value is never read.

This PR removed the references to GraphQLError from generated code.
But the import statement is remaining.
To disable this error, we need to change noUnusedLocals of tsconfig to false.

@charlypoly
Copy link
Contributor

@P4sca1 @charlypoly Hi, I tried v4.4.4 and I got the following error:

'GraphQLError' is declared but its value is never read.

This PR removed the references to GraphQLError from generated code. But the import statement is remaining. To disable this error, we need to change noUnusedLocals of tsconfig to false.

Thanks for pointing this out!
A PR is pending to fix it: #7697

@nabeix
Copy link

nabeix commented Mar 28, 2022

@charlypoly thanks 👍

@charlypoly
Copy link
Contributor

charlypoly commented Mar 30, 2022

@nabeix

@charlypoly thanks 👍

Fixed in @graphql-codegen/typescript-graphql-request@4.4.5 📦

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.

3 participants