Nexus-plugin-prisma: Queries for camelCased models are failing

Created on 31 Jan 2020  路  5Comments  路  Source: graphql-nexus/nexus-plugin-prisma

I just upgraded to the latest versions of prisma2/nexus-prisma and nexus.

After the upgrade, simple queries for camelCased models are failing, e.g.

{
  passTypes {
    id
  }
}

The error is

"TypeError: Cannot read property 'findMany' of undefined",
"    at resolve (/xxxxx/node_modules/nexus-prisma/src/builder.ts:312:60)",

The same simple query with just lowercased models works fine, e.g.

{
    passes {
    id
  }
}

Versions:

"@prisma/client": "^2.0.0-preview021",
"nexus": "^0.12.0-rc.9",
"nexus-prisma": "^0.9.0",
impachigh typbug

Most helpful comment

Thanks for reporting. Hold off on the latest upgrade, will try to fix this weekend.

All 5 comments

can confirm this problem

I have the same issue

Thanks for reporting. Hold off on the latest upgrade, will try to fix this weekend.

Same problem

TypeError: Cannot read property 'findOne' of undefined at fieldConfig.buildFieldConfig.resolve (..../node_modules/nexus-prisma/src/builder.ts:477:62)

0.9.1-next.1 (next dist tag) is available. If all is looking good, @Weakky or I will cut stable tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryands17 picture ryands17  路  5Comments

antonbramsen picture antonbramsen  路  4Comments

macrozone picture macrozone  路  3Comments

franjohn21 picture franjohn21  路  4Comments

aqwert picture aqwert  路  3Comments