Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with urql since v1.8.8 #398

Closed
3 tasks done
Schleuse opened this issue Sep 20, 2024 · 0 comments · Fixed by #400
Closed
3 tasks done

Incompatibility with urql since v1.8.8 #398

Schleuse opened this issue Sep 20, 2024 · 0 comments · Fixed by #400

Comments

@Schleuse
Copy link

Describe the bug

Due to changes made in #396, version 1.8.8 throws the following error when paired with urql:

Uncaught TypeError: Cannot set property loc of #<Object> which has only a getter
    at stringifyDocument (request.ts:74:19)
    at hashDocument (request.ts:107:17)
    at keyDocument (request.ts:136:48)
    at createRequest (request.ts:171:17)
    at useRequest.ts:20:21
    at mountMemo (react-dom.development.js:16406:19)
    at Object.useMemo (react-dom.development.js:16851:16)
    at Object.useMemo (react.development.js:1650:21)
    at useRequest (useRequest.ts:19:16)
    at useQuery (useQuery.ts:225:19)

The introduced loc property tries to be set here by urql.

Maybe a setter for the loc property should be added as well.

Reproduction

Use urql and gql.tada version 1.8.8

gql.tada version

gql.tada v1.8.8

Validations

  • I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
  • Read the docs.
  • Follow our Code of Conduct
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 a pull request may close this issue.

1 participant