You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I'm creating a self relations in a module, pal g made a wrong import from the module to its self, this confusion happened because the module has relations to its self:
model Category {
id Int @id @default(autoincrement())
name String
parentId Int?
parent Category? @relation("CategoryTree", fields: [parentId], references: [id])
children Category[] @relation("CategoryTree")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
The generated code was like this:
import { GraphQLModule } from '@graphql-modules/core'
import typeDefs from './typeDefs'
import resolvers from './resolvers'
import { addSelect } from '../common/addSelect'
import { CommonModule } from '../common/common.module'
import { CategoryModule } from '../Category/Category.module'
export const CategoryModule = new GraphQLModule({
name: 'Category',
typeDefs,
resolvers,
imports: [CommonModule, CategoryModule],
resolversComposition: {
Query: [addSelect],
Mutation: [addSelect],
},
})
as you see the module name is CategoryModule and it contain an import to CategoryModule in the same time
The text was updated successfully, but these errors were encountered:
Hi,
While I'm creating a self relations in a module, pal g made a wrong import from the module to its self, this confusion happened because the module has relations to its self:
The generated code was like this:
as you see the module name is CategoryModule and it contain an import to CategoryModule in the same time
The text was updated successfully, but these errors were encountered: