For this datamodel:
type Post {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
isPublished: Boolean! # @default(value: false)
title: String!
text: String!
author: User! @relation(name: "UserPosts")
}
type User {
id: ID! @unique
email: String! @unique
password: String!
name: String!
posts: [Post!]! @relation(name: "UserPosts")
}
this is the generated User
type:
It is lacking another field postsConnection: PostConnection!
.
Is there an ETA on when this will be implemented? This seems like a rather large missing feature.
Thanks for your feedback, @vanimschootrein! I agree, this is a great feature to add. It's on our roadmap and we'll tackle it soon :slightly_smiling_face:
Any ETA on this bug? In a decent-sized schema, the workaround gets to be a bit much.
Update: I've spent hours today trying to make workarounds scale. The missing inner edge is just too hard to workaround in any generic way. I feel like my time might have been better spent fixing the actual deficiency in the Prisma
code base :-( Can someone point me to the right part of the prisma code base?
FWIW, I'll mention two issues from a resolver perspective, to be specific.
{edge: {node}}
to conform to the Relay
specs.How is anyone making Prisma work with Relay
in the presence of these for a non-trivial, non-toy schema/app.
Is there any workaround on the client side to update the relay store?
Based on the schema above, I'm essentially adding a new post to the User. I need to update the store record and have react-relay re-render the components.
I would love to see this implemented!
Anything new here? I'd love to see this!
This is a bummer that Connections and Edges aren't fully supported for a Relay client. Seems like a critical omission. Is there any outline of what work needs to be done on this?
For reference if you're looking at writing your own spec for a resolver with a connection and a create
mutation that returns an Edge:
https://github.com/este/este/blob/760d490a3ef4e7501c9381387a6dcb9ca6aa2646/server/resolvers/index.js#L106
https://stackoverflow.com/questions/38369825/what-restrictions-has-cursor-in-graphql-connections-for-relay
Most helpful comment
Is there an ETA on when this will be implemented? This seems like a rather large missing feature.