Industrial
11/27/2018, 10:40 PMtype User @model {
id: ID! @unique
name: String!
dashboard: Dashboard @relation(name: "UserDashboard" onDelete: CASCADE)
}
type Dashboard @model {
id: ID! @unique
user: User! @relation(name: "UserDashboard")
charts: [Chart!]! @relation(name: "DashboardCharts" onDelete: CASCADE)
}
Industrial
11/27/2018, 10:41 PMIndustrial
11/27/2018, 10:41 PMIndustrial
11/27/2018, 10:42 PMquery getUserWithDashboardWithChartsWithMarket($userId: ID!) {
user(where: { id: $userId }) {
id
name
dashboard {
huv1k
11/27/2018, 10:43 PMIndustrial
11/27/2018, 10:43 PMIndustrial
11/27/2018, 10:44 PMArgument 'where' expected type 'DashboardWhereUniqueInput!' but got: {user: {id: \"cjnj6iu8u04lg0a838n9wy734\"}}. Reason: 'user' Field 'user' is not defined in the input type 'DashboardWhereUniqueInput'. (line 2, column 20):\n dashboard(where: {user: {id: \"cjnj6iu8u04lg0a838n9wy734\"}}) {\n ^\n (line 2, column 21):\n dashboard(where: {user: {id: \"cjnj6iu8u04lg0a838n9wy734\"}}) {\n ^
huv1k
11/27/2018, 11:05 PM