如何使用 Graphql SPQR 实现查询过滤器和排序?
我正在寻找一个使用 Graphql SPQR 的解决方案,它看起来像这样。
schema {
query: Query
mutation: Mutation
}
enumSortOrder {
ASC
DESC
}
type Article {
id: String
name: String
createdByUserId: String
createdOn: String
lastUpdatedOn: String
}
type Feedback {
id: String
feedbackText: String
articleId: String
createdByUserId: String
createdOn: String
lastUpdatedOn: String
}
type Query {
getAllArticles(pageNumber: Int!, pageSize : Int!, sortOrder: SortOrder!, sortBy: String!): [Article]
getFeedBacksForArticle(articleId: String!): [Feedback]
}
type Mutation {
createArticle(name: String!, createdByUserId: String!): Article
createNewFeedback(feedbackText: String!, articleId: String!, createdByUserId: String!): Feedback
}