Isaac Weber
11/21/2019, 2:59 PMIsaac Weber
11/21/2019, 3:00 PMNoel Kriegler
11/21/2019, 3:02 PMtej
11/21/2019, 11:14 PMManav Dhindsa
11/22/2019, 12:25 AMManav Dhindsa
11/22/2019, 12:28 AMManav Dhindsa
11/22/2019, 12:29 AMNesh
11/22/2019, 5:47 AMNesh
11/22/2019, 5:47 AMNesh
11/22/2019, 5:47 AMNesh
11/22/2019, 5:47 AMHung Tran
11/22/2019, 11:20 AMMatt Mueller (Prisma Client PM)
vjsingh
11/22/2019, 3:34 PMed
11/22/2019, 6:01 PMAlbert Gao
11/24/2019, 9:37 AM1.0
that time? Thanks 🙂Shubham Maurya
11/24/2019, 3:51 PMandrew bantug
11/24/2019, 5:43 PMPerson
, Business
, and Contact
. A person can have many contacts and a business can have many contacts. A Contact should relate back to one node.
In the frontend application, I'd like to be able to do a kind of global search. For example, query a phone number and get back the person/business associated with that phone number.
My question is how can I say that a contact should relate back to a person or a business? I haven't been able to find a way. My idea is to store the ID of the person/business as a field called ref and lookup the person/business after a match with phone number has been made. I get the feeling this might be somewhat anti-pattern. Any guidance would be appreciated. Snippet below for context
type Contact {
id: ID! @id
type: ContactType
contact: String @unique
ref: ID
}
type Person {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
firstName: String
lastName: String
phone: [Contact]
email: [Contact]
...details
}
type Business {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
name: String
phone: [Contact]
email: [Contact]
...details
}
Seppe Snoeck
11/24/2019, 6:37 PMTypeError: nexus_prisma_2.prismaObjectType is not a function
Is there something I am doing wrong or is this tutorial outdated?
https://www.prisma.io/docs/1.34/get-started/03-build-graphql-servers-with-prisma-TYPESCRIPT-t201/#implement-graphql-api-based-on-crud-building-blocksNaimur Rahman
11/25/2019, 4:38 AMNaimur Rahman
11/25/2019, 4:39 AMNaimur Rahman
11/25/2019, 4:41 AMUser!
and [User!]
It's telling me to not use same relation name. How to get rid of it?Albert Gao
11/25/2019, 6:54 AMprisma-examples
, none of them works. https://github.com/prisma/prisma-examples/issues/1024Naimur Rahman
11/25/2019, 6:59 AMAlbert Gao
11/25/2019, 7:19 AMNaimur Rahman
11/25/2019, 7:27 AMMartin Benjamin
11/25/2019, 8:19 AMcreateProduct(name:String! brand:Brand!, productType:ProductType!): Product
My GraphQL server return to me an error and says that i need to create an INPUT type.Martin Benjamin
11/25/2019, 8:20 AMEric Do
11/25/2019, 8:23 AMLars Ivar Igesund
11/25/2019, 8:37 AM