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

Type Incompatibility in Apollo Client 3.8 #1093

Open
tictaqqn opened this issue Nov 3, 2023 · 1 comment
Open

Type Incompatibility in Apollo Client 3.8 #1093

tictaqqn opened this issue Nov 3, 2023 · 1 comment

Comments

@tictaqqn
Copy link

tictaqqn commented Nov 3, 2023

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    While working on a project with Apollo Client 3.8, I've encountered a type incompatibility issue between the type of ApolloLink and the return type of withScalars. Specifically, the types of the fields split, left, right in ApolloLink appear to be incorrect.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

@eturino
Copy link
Owner

eturino commented Dec 12, 2023

the type returned by withScalars is an ApolloLink that comes from

import { ApolloLink, FetchResult, NextLink, Observable, Operation } from "@apollo/client/core";

@apollo/client is a Peer Dependency (marked as "@apollo/client": "3.x"), so it will use whatever version you have in your app.

I have checked in my app, and works fine for me. It uses:

  • in package.json
"@apollo/client": "~3.8.8",
  • in yarn.lock:
"@apollo/client@~3.8.8":
  version "3.8.8"

If you are able to provide a repo where I can replicate the error, I could investigate further.

Cheers!

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

No branches or pull requests

2 participants