I have found graphQL to work straight of the bat with this schema
type Comment {
comment: String
subscriber: Subscriber
blog: Blog @relation
likes: Int
}
type Blog {
title: String
likes: Int
author: Author! @relation
comments: [Comment!] @relation
}
{
comments {
_id
title
blog {
title
}
}
}
But FaunaDB GraphQL doesnt support this until we provide a query in the schema
query findCommentByID($id: ID!) {
findCommentByID(id: $id) {
_id
comment
blog {
title
}
}
}
My other question was how to implement something like findAllCommentsByBlogId