gsancho
04/16/2018, 7:55 AMeliezedeck
04/16/2018, 8:51 AMUPDATED
mutation_in? I can't seem to be able to get any trigger about this. Only CREATED
and DELETED
work. I'm beginning to suspect it's a bug, but seeing the fact that we're at Prisma 1.6 (past stable 1.0), I have doubts that it might not be a bug.
I have the query:
subscription DepartmentMutation {
departmentSubscription(where: {
mutation_in: [CREATED, DELETED, UPDATED]
}) {
mutation
node {
id
name
}
updatedFields
previousValues {
id
}
}
}
with Resolver:
javascript
const Subscription = {
departmentSubscription: {
subscribe: async (parent, { where }, ctx, info) => {
return ctx.db.subscription.department(where, info)
}
}
}
gsancho
04/16/2018, 9:04 AMuser
04/16/2018, 9:04 AMrein
04/16/2018, 9:04 AMERROR: All fields within 'Query' type should have unique names! Non-unique fields: 'news'.
{
"errors": [
{
"message": "All fields within 'Query' type should have unique names! Non-unique fields: 'news'.",
"requestId": "api:api:cjg20il4nmnif0902huatu123"
}
],
"status": 500
}
user
04/16/2018, 9:28 AMuser
04/16/2018, 9:45 AMuser
04/16/2018, 9:46 AMnilan
04/16/2018, 9:46 AMrein
04/16/2018, 12:56 PM[GraphQL error]: Message: Unknown type "NewsItemCreateInput"., Location: [object Object], Path: undefined
[GraphQL error]: Message: Cannot query field "createNewsItem" on type "Mutation". Did you mean "createDraft"?, Location: [object Object], Path: undefined
[Network error]: Error: Unknown type "NewsItemCreateInput".
{ Error: Unknown type "NewsItemCreateInput".
Waweru
04/16/2018, 1:11 PM127.0.0.1/api/customer/${id}
).then(resp => resp.data);
}
}
}`Sannikay
04/16/2018, 2:30 PMstatic newLinkSubscribe(parent, args, context, info) {
return context.db.subscription.link(
{ where: { mutation_in: ['CREATED'] } },
info
)
}
I tried using the "where" filter for subscription using the Howtographql tutorial but it's not working instead if I pass in an empty object it works as shown below
static newLinkSubscribe(parent, args, context, info) {
return context.db.subscription.link(
{ },
info
)
}
lewisblackwood
04/16/2018, 4:13 PM.env
files when running yarn dev
using one of the Prisma GraphQL server boilerplates? I'm following the recommended workflow of separating my environments with .env
files and using variables in the prisma.yml
file. This works great when running prisma deploy
with a --env-file
flag. However, running yarn dev
will only read from a .env
file - is there a way to change this?ldlework
04/16/2018, 4:17 PMorr
04/16/2018, 5:39 PMmax
04/16/2018, 6:08 PMzonofthor
04/16/2018, 8:21 PMmutation { createNotes: {data: {connect: {...where noteId is XXX...] }} } }
pasa
04/16/2018, 8:42 PMSim
04/16/2018, 8:47 PMuser
04/16/2018, 8:51 PMhttps://prisma.slack.com/files/U9YB34U9Y/FA8LNPJ6S/image.png▾
windkomo
04/16/2018, 8:57 PMChecklistItem
that’s part of another another model. The input has this form:
input ChecklistItemUpsertWithWhereUniqueWithoutRequestInput {
where: ChecklistItemWhereUniqueInput!
update: ChecklistItemUpdateWithoutRequestDataInput!
create: ChecklistItemCreateWithoutRequestInput!
}
What data do I need to provide for the upserts to be successful? I don’t understand why the where
field is needed in the case of a “create” upsertuser
04/16/2018, 9:00 PMhttps://prisma.slack.com/files/U9YB34U9Y/FA8LNPJ6S/image.png▾
Sim
04/16/2018, 9:25 PMSim
04/16/2018, 9:25 PMzonofthor
04/16/2018, 9:29 PMrwatts3
04/16/2018, 9:33 PMlawjolla
04/16/2018, 9:44 PMsajmil
04/17/2018, 12:00 AMdohomi
04/17/2018, 2:23 AMdohomi
04/17/2018, 2:59 AM