Alan William Duarte
07/04/2020, 4:03 PMAlan William Duarte
07/04/2020, 4:06 PMstephan
07/05/2020, 8:11 AMLogan Lee
07/06/2020, 12:36 AMLogan Lee
07/06/2020, 12:37 AMstephan
07/06/2020, 7:03 AMParthasarathy Ramanujam
07/07/2020, 10:26 AMParthasarathy Ramanujam
07/07/2020, 10:26 AMTroy
07/07/2020, 9:14 PMconnect
field on a mutation? I have a datamodel with "Items" that can optionally be contained in "Lists":
datamodel.prisma
:
type Item {
id: ID!
name: String
lists: [List]
}
type List {
id: ID!
name: String
items: [Item]
}
with the following frontend `schema.graphql`:
# import * from './generated/prisma.graphql'
type Mutation {
createItem(name: String, lists: ListCreateManyWithoutItemsInput): Item!
}
I set up a mutation as follows in the react component:
`NewItem.js`:
const CREATE_ITEM = gql`
mutation CREATE_ITEM(
$name: String
$listID: ID
) {
createItem(
name: $name
lists: { connect: { id: $listID } }
) {
id
}
}
`;
I would expect that I don't have to pass a listID
but when I try to use that mutation with only a name param I get the following error which makes me think it always expects me to pass a listID?
[GraphQL error]: Message: You provided an invalid argument for the where selector on List. Please provide exactly one unique field and value., Location: , Path: createItem
ojschwa
07/08/2020, 7:11 AMSohail Haider
07/08/2020, 8:22 AMjavascript-client
client generated in via docker prismagraphql/prisma:1.34
, I'm trying perform or operation like prisma.posts({where: {OR:[...filters]} })
but unable to find any OR field. I have AND field generated and exported though. Any Community help highly appreciated.khareta
07/08/2020, 12:17 PMJonathan Romano
07/08/2020, 2:33 PMParthasarathy Ramanujam
07/08/2020, 4:06 PMParthasarathy Ramanujam
07/08/2020, 4:07 PMStefan Trivuncic
07/08/2020, 7:43 PMpostgreSQL
database via Heroku
and Jest
with nexus
?
I followed the documentation here and provided the correct database credentials: https://nexusjs.org/guides/testing#with-a-database
But I get this error:
FAIL tests/Mutation.test.ts
● Test suite failed to run
error: no pg_hba.conf entry for host "70.80.32.135", user "rhrzlrzgvrssea", database "test", SSL off
at Parser.parseErrorMessage (node_modules/pg-protocol/src/parser.ts:325:11)
at Parser.handlePacket (node_modules/pg-protocol/src/parser.ts:154:21)
at Parser.parse (node_modules/pg-protocol/src/parser.ts:106:30)
at Socket.<anonymous> (node_modules/pg-protocol/src/index.ts:7:48)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.693 s
Ran all test suites.
npm ERR! Test failed. See above for more details.
There is an open issue here: https://github.com/facebook/jest/issues/8449 and I have already tried passing in ssl=true
into the connection url but this creates this issue:
FAIL tests/Mutation.test.ts
● Test suite failed to run
self signed certificate
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.711 s
Ran all test suites.
npm ERR! Test failed. See above for more details.
Donte
07/08/2020, 11:13 PMgamsterx
07/08/2020, 11:14 PMDeanMo
07/10/2020, 1:42 PMshilpa mittal
07/10/2020, 4:27 PMshilpa mittal
07/10/2020, 4:29 PMshilpa mittal
07/10/2020, 4:30 PMRudi Yardley
07/10/2020, 8:49 PMname
field to first_name
and last_name
to be able to run a script that updated the data on migrate. Or is this not a recommended practice? Is there a discussion anywhere on this?Ashiqur Rahman
07/11/2020, 11:59 AMif (testUser.roles.includes('ADMIN')) {
return prisma.user.findMany({
take,
skip,
include: { posts: true },
where: { roles: 'USER' },
});
}
How can I filter roles
property in where selector. [roles is an array]Joseph
07/12/2020, 1:53 AMCCBCodeMonkey
07/12/2020, 3:17 AMCCBCodeMonkey
07/12/2020, 3:18 AMCCBCodeMonkey
07/12/2020, 3:19 AMCCBCodeMonkey
07/12/2020, 3:20 AMBen
07/13/2020, 1:20 AM