doums
09/19/2019, 12:10 PMdocker-compose.yml
doums
09/19/2019, 12:12 PMdoums
09/19/2019, 12:13 PMjaga_santagostino
09/19/2019, 2:56 PMjaga_santagostino
09/19/2019, 3:29 PMKimble
09/19/2019, 11:38 PMPeter Portante
09/20/2019, 5:04 AMprilutskiy
09/20/2019, 7:21 AMprilutskiy
09/20/2019, 7:22 AMprilutskiy
09/20/2019, 7:22 AMdoums
09/20/2019, 7:26 AMAndrew O.
09/20/2019, 7:40 PMTEMILOLUWA OJO PHILIP
09/21/2019, 4:27 PMERROR: No cluster could be found for workspace '*' and cluster 'default'
. Tried implementing this solution but still doesn't work for me https://www.prisma.io/forum/t/error-no-cluster-could-be-found-for-workspace-and-cluster-default/6402
I have provided my prisma management secret and also management api secret but still facing this issue.
Currently running on Prisma CLI version: prisma/1.34.8 (windows-x64) node-v10.16.3
Many thanks.Mehmet Onur Sagir
09/22/2019, 1:03 PMLucas
09/22/2019, 11:14 PMrli
09/23/2019, 4:40 AMrli
09/23/2019, 4:41 AMrli
09/23/2019, 4:41 AMrli
09/23/2019, 4:41 AMkani
09/23/2019, 7:47 AMkani
09/23/2019, 8:36 AMJonas
09/23/2019, 9:29 AMJamesJ
09/23/2019, 10:25 AMCarlo Clamucha
09/23/2019, 10:51 AMrli
09/23/2019, 12:12 PMIsmail Arafa
09/23/2019, 1:51 PMtype User {
id: ID! @id
username: String! @unique
email: String! @unique
phoneNum: String @unique
firstName: String!
lastName: String!
password: String!
profilePicture: String
status: Status! @default(value: ACTIVE)
followers: [User!]!
following: [User!]!
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
}
type Following {
id: ID! @id
follower: User!
followed: User!
blocked: Boolean! @default(value: false)
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
}
When I run prisma deploy
, I get an error saying that the relations followers
, following
(on User
), follower
, followed
(on Following
) don't have names. If anyone could help me with figuring this issue out, I would be forever grateful as I have been struggling with this for a couple of weeks now. My current workaround is that I deleted the followers
and following
fields on User
and instead wrote resolvers for them as computed fields and named the followed
and follower
relations on `Following`:
// resolvers/User.ts
t.list.field("followers", {
type: "User",
resolve: async ({ id }, args, ctx) => {
const fragment = `
fragment FollowerUserInfo on User {
follower {
username
email
firstName
lastName
profilePicture
id
}
}
`;
const rows: User[] = await ctx.prisma.followings({ where: { AND: [{ followed: { id } }, { blocked: false } ] } }).$fragment(fragment);
const followers = rows.map((elm: any) => elm.follower);
return followers;
}
});
// datamodel.prisma
type Following {
id: ID! @id
follower: User! @relation(name: "Follower")
followed: User! @relation(name: "Followed")
blocked: Boolean! @default(value: false)
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
}
Moreover, I am using the following versions of Prisma-related dependencies:
"dependencies": {
"apollo-server-express": "^2.9.3",
"express": "^4.17.1",
"graphql": "^14.5.4",
"graphql-middleware": "^4.0.1",
"graphql-shield": "^6.1.0",
"nexus-prisma": "^0.3.8",
"prisma-client-lib": "^1.34.8"
},
"devDependencies": {
"@types/express": "^4.17.1",
"@types/graphql": "^14.5.0",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.4",
"@typescript-eslint/parser": "^2.3.0",
"apollo-server-testing": "^2.9.3",
"jest": "^24.9.0",
"ts-node": "^8.3.0",
"ts-node-dev": "^1.0.0-pre.42",
"typescript": "^3.4.5"
}
Please let me know if this makes sense or not or if there's a more efficient way of doing things. Thanks!Omar Hussain
09/23/2019, 8:36 PMPeter Dresslar
09/23/2019, 8:59 PMrdc
09/24/2019, 8:15 AMRichard Rumsey
09/24/2019, 10:02 AM