Giter Club home page Giter Club logo

Comments (14)

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024 9

@alessbell it works as a charm after bumping @wry/trie: 5. Thank you for your time in this one. I can't remember why on earth I had this dep pinned.

eslint errors are gone too!

from apollo-client.

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024 2

I think the problem is with Hermes WeakRef used by toBeGarbageCollected.ts : facebook/react-native#42742

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024 1

Glad to hear it, @efstathiosntonas!

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024 1

@efstathiosntonas would you mind opening a separate issue for that and I'll x-link to your comment above? Will take a look, thanks!

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024

Great find, @efstathiosntonas, and funny timing: I see it was opened yesterday with tracking issues on the Hermes project going back to at least 2021.

That does seem possibly relevant, but toBeGarbageCollected.ts contains testing matchers used by our Apollo Client test suite that shouldn't wind up in your bundle. One of our maintainers is out sick today and I'm still investigating this, thanks for your patience.

from apollo-client.

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024

@alessbell you're right 🤦 , should have noticed the file path!

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024

Thanks for sharing your demo, @efstathiosntonas (moving our thread over here 😊).

please note that i cannot reproduce it

I also can't reproduce it in our rn-apollo-client-testbed repo that uses codegen (all dependencies on latest). Can you confirm which versions you're using of all relevant dependencies?

from apollo-client.

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024

these are the codegen versions:

{
 "@graphql-codegen/add": "5.0.0",
    "@graphql-codegen/cli": "5.0.0",
    "@graphql-codegen/fragment-matcher": "5.0.0",
    "@graphql-codegen/introspection": "4.0.0",
    "@graphql-codegen/jsdoc": "3.0.0",
    "@graphql-codegen/typescript": "4.0.1",
    "@graphql-codegen/typescript-apollo-client-helpers": "3.0.0",
    "@graphql-codegen/typescript-operations": "4.0.1",
    "@graphql-codegen/typescript-react-apollo": "4.1.0",
    "@graphql-eslint/eslint-plugin": "3.20.1",
}

and codegen.yml:

schema:
  - "http://localhost:9091/v1/graphql":
      headers:
        x-hasura-admin-secret: myadminsecretkey
#  - "directive @connection(key: String, filter: [String]) on FIELD"
watch: true
require:
  - ts-node/register
documents: 'src/**/*.graphql'
emitLegacyCommonJSImports: false
config:
  scalars:
    DateTime: Date
    JSON: "{ [key: string]: any }"
    timestamptz: string
    numeric: number
overwrite: true
generates:
  ./src/generated/apollo-helpers.ts:
    plugins:
      - typescript-apollo-client-helpers
  ./src/generated/graphql.tsx:
    schema: schema.json
    plugins:
      - "typescript"
      - "typescript-operations"
      - "typescript-react-apollo"
      - 'jsdoc'
      - add:
          content: "/* eslint-disable */"
    config:
      constEnums: true
      #immutableTypes: true
      preResolveTypes: true
      defaultMapper: any
      reactApolloVersion: 3
      skipTypename: false
      avoidOptionals: true
      maybeValue: T
      withHooks: true
      withComponent: false
      withHOC: false
      withRefetchFn: true
    hooks:
      afterOneFileWrite:
        - prettier --write
  ./src/graphql.schema.json:
    plugins:
      - "introspection"
    config:
      minify: true
    hooks:
      afterOneFileWrite:
        - prettier --write
  ./src/generated/fragments.tsx:
   plugins:
     - fragment-matcher
     - add:
         content: "/* eslint-disable */"
   config:
     useExplicitTyping: true
   hooks:
     afterAllFileWrite:
       - prettier --write

edit: my eslint throws errors everywhere as you can see on the first comment

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024

Thanks for that @efstathiosntonas 👍

I'm looking into the eslint errors you're seeing as possibly distinct from the runtime error of inFlightLinkObservables_1.remove is not a function (could be same root cause but maybe not). I'm still getting set up to reproduce your eslint/codegen config.

On the runtime error, can you please confirm you have the transitive dependency @wry/trie v0.5.0 in your node_modules? It's a dependency of Apollo Client's that we bumped in v3.9.0 so I'm not sure why you'd have an incompatible version after upgrading, but want to confirm.

from apollo-client.

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024

ahhhh, I got @wry/trie pinned to 0.4.3 on resolutions, let me try that.

from apollo-client.

alessbell avatar alessbell commented on September 26, 2024

Aha, that would do it! Out of curiosity: do you remember why you pinned that in the first place? Hoping that resolves the eslint errors you're seeing too :)

from apollo-client.

github-actions avatar github-actions commented on September 26, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

from apollo-client.

efstathiosntonas avatar efstathiosntonas commented on September 26, 2024

@alessbell just an update, eslint errors are not gone, I guess this is codegen issue now.

from apollo-client.

github-actions avatar github-actions commented on September 26, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

from apollo-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.