Paul Hachmang
09/04/2019, 3:58 PMPaul Hachmang
09/04/2019, 3:58 PMRichard Ward
09/04/2019, 8:18 PMtype Asset {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
version: Int! @default(value: 1)
title: String!
description: String
amount: Float
user: User!
assetType: AssetType!
quote: [Quote!]!
policy: [Policy!]!
assetMedia: [AssetMedia!]
}
There are 5 non-scalar data types on there, does this mean that to get the full “row” from the db I need to do:
const asset = await prisma.asset({ id: id });
const user = await prisma.asset({ id: id }).user();
const policies = await prisma.asset({ id: id }).policy();
const quotes = await prisma.asset({ id: id }).quote();
const assetMedia = await prisma.asset({ id: id }).assetMedia();
const assetType = await prisma.asset({ id: id }).assetType();
const assetRow = {
...asset,
user: user.id,
assetType: assetType.id,
quote: quotes.map(quote => quote.id),
policy: policies.map(policy => policy.id),
assetMedia: assetMedia.map(assetMedia => assetMedia.id)
}
am I missing something?LQ
09/05/2019, 12:59 AMAwey
09/05/2019, 1:15 AMFitch
09/05/2019, 1:29 AMdohomi
09/05/2019, 5:39 AMJosef Henryson
09/05/2019, 8:04 AMStefano T
09/05/2019, 8:25 AMJosef Henryson
09/05/2019, 8:36 AMNeal
09/05/2019, 1:31 PM_admin
and /management
pages when the prisma server is using a managementApiSecret
. I can use the $ prisma token
command but I'm not sure where/how to use it when you are trying to navigate to the pages itself...Neal
09/05/2019, 1:31 PMIsaac Weber
09/05/2019, 3:50 PMIsaac Weber
09/05/2019, 3:50 PMSean Langford
09/05/2019, 4:33 PMColin
09/05/2019, 9:39 PMprisma init
? I'm trying to use prisma with existing data.Bruce He
09/06/2019, 4:15 AMMark Stephenson
09/06/2019, 8:12 AMJavid Abdullaev
09/06/2019, 11:12 AMDavey
09/06/2019, 11:21 AMDavey
09/06/2019, 11:21 AMDavey
09/06/2019, 11:21 AMDavey
09/06/2019, 11:22 AMDavey
09/06/2019, 11:25 AMDavey
09/06/2019, 12:24 PMMatt Webster
09/06/2019, 2:31 PMIvor
09/06/2019, 3:58 PMAwey
09/06/2019, 4:40 PMAwey
09/06/2019, 4:43 PMcurrentUser
info displayed? I already have a currentUser
query setup to only allow authenticated requests butt hat's only because I manually setup the Bearer token in graphql playground