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
model osoby {
Alias String @unique
Email String?
idOsoby Int @default(autoincrement()) @id
Jmeno String?
Tel String?
}
const Employee = objectType({
name: 'Employee',
definition(t) {
t.model('osoby').idOsoby({ alias: 'id' });
t.model('osoby').Alias({ alias: 'alias' });
t.model('osoby').Jmeno({ alias: 'name' });
t.model('osoby').Email({ alias: 'email' });
t.model('osoby').Tel({ alias: 'phoneNo' });
},
});
const Query = objectType({
name: 'Query',
definition(t) {
t.list.field('employee', {
type: Employee,
resolve(_, args, ctx) { // Type mischmash
return ctx.prisma.osoby.findMany();
}
});
t.crud.osoby({
alias: 'employee',
type: Employee, // ERROR: No subset types are available. Please make sure that one of your GraphQL type is a subset of your t.model('<ModelName>')
});
},
});
I really tried, but I am out of ideas. What should I do? I would love to @map all tables and columns to right names, but until prisma/prisma#2378 is done, it is way beyond reach...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I really tried, but I am out of ideas. What should I do? I would love to
@map
all tables and columns to right names, but until prisma/prisma#2378 is done, it is way beyond reach...Beta Was this translation helpful? Give feedback.
All reactions