Comments (6)
Yep I'll close it I mean this was from a few months ago and a lot has changed so no need to keep this issue open.
from nexus-prisma.
Do you have your nexus object definitions handy? I'm seeing this issue too when I try and create a field on the nexus schema mapping to another collection.
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
homes Home[]
}
model Home {
id String @id @default(auto()) @map("_id") @db.ObjectId
userId String @db.ObjectId
user User @relation(fields: [userId], references: [id])
}
import {User as PrismaUser} from 'nexus-prisma';
const User = objectType({
name: 'User',
definition: (t) {
t.field(PrismaUser.id);
t.field(PrismaUser.homes);
}
}
/Users/potter/workspace/taxes/server/node_modules/nexus/src/builder.ts:1743
return new Error(`${name} was already defined and imported as a type, check the docs for extending types`)
^
Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type, check the docs for extending types
from nexus-prisma.
I found this issue when upgrading prisma
you need to look for type ${yourmodel}OrderByInput in your graphql code generated
and change it to ${yourmodel}OrderByWithRelationInput
because OrderByInput not exist for the last prisma
then you can restart your app and have a try
from nexus-prisma.
Getting same thing after attempting to migrate to nexus-prisma
from nexus-prisma-plugin
, not sure where to look
from nexus-prisma.
This bug means you are using a type that does not exist.
nexus
had an issue because it gives youNEXUS__UNKNOWN__TYPE
instead of the type name.- It's not a bug in
nexus-prisma
- You need to review your code and find what type you use and you didn't create it.
- The
nexus-prisma-plugin
t.crud
generated some inputs likeXwhereInput,
XorderByInput
, and maybe you were using these inputs into your code when you move fromnexus-prisma-plugin
tonexus-prisma
you will not have these types exist anymore so you will get an error.
from nexus-prisma.
Can we close this issue @T-D3V or any update on this?
What do you define in your object types? @AhmedElywa is right this shouldn't be a bug its most likely you've define that object type more than once. comb through your code for a copy of name: '{model}'
to find the one that is a duplicate.
from nexus-prisma.
Related Issues (20)
- Resolver Generated for Non-Scalar Fields Does Not Reflect `name` From Prisma Schema for Primary Keys
- Create a test using pnpm with deployment to vercel HOT 1
- Docs website is down HOT 2
- support for prisma ^4.0.0 HOT 12
- `nexus-prisma` is handed over to the community for more active maintenance & future development 🚀 HOT 8
- Renovate doesn't have visibility for dependencies hardcoded directly HOT 1
- Dependency Dashboard
- Roadmap 2023-Q3 HOT 8
- Scheduled cut of new releases HOT 1
- Missing check for documentation build HOT 1
- Get type error when using `scalar` in `asNexusMethod` after update to `1.0.3` HOT 2
- nexus-prisma command not found
- Test failing in vitest HOT 1
- Cannot find module @prisma/client in Vercel deployment HOT 8
- e2e tests are failing randomly on dependencies installation part HOT 1
- Cannot Import ES Module HOT 3
- Invalid prisma version used in tests
- Read Operations (Query and Input Generation)
- Error: Cannot find module ... @prisma/client/generator-build in @prisma/client 5.9.0+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexus-prisma.