Suhail
05/15/2020, 6:42 AMRizwan Anwar
05/15/2020, 8:54 AMSuhail
05/15/2020, 9:31 AMDulara Malindu Colombage
05/15/2020, 11:45 AMDulara Malindu Colombage
05/15/2020, 11:46 AMDulara Malindu Colombage
05/15/2020, 12:35 PMconst userWithPosts = await prisma.users().$fragment(fragment)
but I can’t use $fragment method like it has been used on this mentioned scenario.
I am using the prisma image prismagraphql/prisma:1.29.1
do I need to update in order to use fragments?Dulara Malindu Colombage
05/15/2020, 12:36 PMnikolasburk
Guillermo Lopez
05/16/2020, 5:42 PMToby
05/16/2020, 6:07 PMRoy
05/16/2020, 6:48 PMmodel Menu {
id Int @default(autoincrement()) @id
name String
company Company @relation(fields: [companyId], references: [id])
companyId Int
isActive Boolean
items ItemOnMenu[]
}
model ItemOnMenu {
id Int @default(autoincrement()) @id
item Item @relation(fields: [itemId], references: [id])
itemId Int
ItemOnOrder ItemOnOrder[]
course String
Menu Menu @relation(fields: [menuId], references: [id])
menuId Int
}
In graphql.ts i have:
schema.objectType({
name: 'Menu',
definition(t) {
t.model.id();
t.model.name();
t.model.items();
t.model.company();
t.model.companyId();
t.model.isActive();
},
});
schema.objectType({
name: 'ItemOnMenu',
definition(t) {
t.model.id();
t.model.item();
t.model.itemId();
t.model.ItemOnOrder();
<http://t.model.Menu|t.model.Menu>();
t.model.menuId();
t.model.course();
t.model.price();
},
});
When i run the following mutation, it will give me an error. The id is in my database, i verified that. This is the mutation:
mutation createNewItemOnMenu(
$item: "test"
$course: "testCourse"
$price: 2.75
) {
createOneItemOnMenu(
data: {
item: { create: { name: $item } }
course: $course
price: $price
Menu: { connect:{id: 60} }
}
) {
id
item {
name
}
}
}
This is the error which gives me a really big headache.
"message": "\n\u001b[31mInvalid \u001b[1m`prisma.itemOnMenu.create()`\u001b[22m invocation:\u001b[39m\n\n Null constraint violation on the fields: (`id`)",
Anyone there who can help me?
I am running:
"@prisma/cli": "^2.0.0-beta.4",
"@prisma/client": "^2.0.0-beta.4",
"nexus-plugin-prisma": "^0.8.0-next.9",
Manthan Mallikarjun
05/17/2020, 7:42 PM@map
on everythingcfree
05/17/2020, 11:26 PMezeikel
05/18/2020, 2:46 AMAhmad
05/18/2020, 2:35 PMprisma deploy
after than prisma generate
, But do I have to write Query and Mutation related schema.graphql
and schemaTypes.graphql
by hand?
I have alot of modules in code where these files are present and look very much auto gen. But prisma generate
doesn't seem to have any command for this neither does graphqlgen
(0.5.0).jt
05/18/2020, 7:05 PMOmar Harras
05/18/2020, 8:29 PMcannot not return null for non-nullable field
error ?
because when I run my query in the prisma playground it works but not in my localhost playground,
anyone can help please ?Shivam Patel
05/18/2020, 10:03 PMCorey Snyder
05/19/2020, 2:04 AMbob
05/19/2020, 7:48 AMtypeDefs: [KeycloakTypeDefs, "./src/schema.graphql"],
schemaDirectives: KeycloakSchemaDirectives,
KeycloakTypeDefs or KeycloakSchemaDirectives
im not sure which one, comes with an @auth
type but i dont know how to use it in my schema fileS Khan
05/19/2020, 8:48 AMgraphql-yoga
for a project and noticed a slight issue and potential security vulnerability. Maybe it’s a known issue but basically the validation rules aren’t forwarded down to subscriptions-transport-ws
which means if you were to disable Introspection, it would only be applicable to queries over http and not subscriptions. I’ve patched this locally in my project, any objections to me opening a PR for the same in graphql-yoga? or anything I missed?TEMILOLUWA OJO PHILIP
05/19/2020, 11:08 AMreem
05/20/2020, 12:26 AMreem
05/20/2020, 12:27 AMtabs
what I'm looking for?Ahmad
05/20/2020, 8:31 AMTimeout
error resulting in 503.stephan
05/20/2020, 8:31 AMAhmad
05/20/2020, 8:32 AMConner Novicki
05/20/2020, 4:04 PMChazzz
05/20/2020, 4:16 PM