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

Cannot read properties of undefined (reading 'get') #5312

Closed
pablochitolina opened this issue Apr 7, 2023 · 2 comments
Closed

Cannot read properties of undefined (reading 'get') #5312

pablochitolina opened this issue Apr 7, 2023 · 2 comments

Comments

@pablochitolina
Copy link

I'm using the combination of these 3 imports with the latest versions to generate the Schema from a PostgreSQL database:

@graphql-mesh/cli "^0.82.32",
@graphql-mesh/postgraphile "^0.22.22",
@graphql-mesh/transform-filter-schema "^0.15.25"

And trying to filter some schema operations by adding this to my meshrc.yaml:

transforms:
  - filterSchema:
      mode: bare
      filters:
        - Mutation.!*
        - Type.!{knex_migrations, knex_migrations_lock}
        - Query.!{count_knex_migrations, count_knex_migrations_lock}

But when I try to generate the Schema I receive this error:

💡 🕸️  Mesh  Cleaning existing artifacts
💡 🕸️  Mesh  Reading the configuration
💡 🕸️  Mesh  Generating the unified schema
💡 🕸️  Mesh  Generating artifacts
💡 🕸️  Mesh  Generating index file in TypeScript
💥 🕸️  Mesh  TypeError: Cannot read properties of undefined (reading 'get')
    at generateTsArtifacts (******\node_modules\@graphql-mesh\cli\cjs\commands\ts-artifacts.js:114:70)
    at Object.handler (*******\node_modules\@graphql-mesh\cli\cjs\index.js:324:61)

In another project that I'm using Mesh to generate a schema based on a MySQL database with the following dependencies:

@graphql-mesh/cli "^0.82.6",
@graphql-mesh/mysql "^0.19.2"
@graphql-mesh/transform-filter-schema "^0.15.5"

So it makes me thing that there is some incompatibilities with between there libs:

  • @graphql-mesh/cli
  • @graphql-mesh/postgraphile
  • @graphql-mesh/transform-filter-schema

Because even using the combination of several older version, the same error is occurring.

@ardatan
Copy link
Owner

ardatan commented Apr 17, 2023

Could you pin the versions and make sure they are all the latest ones? Thanks!
And please avoid using bare mode with postgraphile handler.

@ardatan
Copy link
Owner

ardatan commented Mar 20, 2024

Closing due to the inactivity. Feel free to reopen the issue with a reproduction if it persists.

@ardatan ardatan closed this as completed Mar 20, 2024
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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

No branches or pull requests

2 participants