Hi all. I am creating a schema as shown below. I a...
# orm-help
s
Hi all. I am creating a schema as shown below. I am getting an error that the Content union type does not exist. Any thoughts on why?
Copy code
union Content = Post | Comment

interface ContentInterface {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  author: User!
  body: String!
}

type Post implements ContentInterface {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  author: User!
  body: String!
  comments: [Comment!]!
}

type Comment implements ContentInterface {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  author: User!
  body: String!
  parent: Content!
}

type User {
  id: ID! @unique
  email: String! @unique
  password: String!
  name: String!
  posts: [Post!]!
  content: [Content!]!
}
d
I don’t think union types are supported https://github.com/prismagraphql/prisma/issues/165
s
That issue is from a year ago 😞
Is there a way to see what IS supported?
Yea
Copy code
More SDL features
In this section, we describe further SDL features that are not yet supported for data modelling with Prisma
...
Interfaces
...
Union Types
s
Roger that. cheers