123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- # ===============================================
- # COMMENT
- # ===============================================
- extend type Query {
- comments: CommentQuery
- }
- extend type Mutation {
- comments: CommentMutation
- }
- # -----------------------------------------------
- # QUERIES
- # -----------------------------------------------
- type CommentQuery {
- providers: [CommentProvider] @auth(requires: ["manage:system"])
- list(
- pageId: Int!
- ): [CommentPost]! @auth(requires: ["read:comments", "manage:system"])
- single(
- id: Int!
- ): CommentPost @auth(requires: ["read:comments", "manage:system"])
- }
- # -----------------------------------------------
- # MUTATIONS
- # -----------------------------------------------
- type CommentMutation {
- updateProviders(
- providers: [CommentProviderInput]
- ): DefaultResponse @auth(requires: ["manage:system"])
- create(
- pageId: Int!
- replyTo: Int
- content: String!
- ): DefaultResponse @auth(requires: ["write:comments", "manage:system"])
- update(
- id: Int!
- content: String!
- ): DefaultResponse @auth(requires: ["write:comments", "manage:comments", "manage:system"])
- }
- # -----------------------------------------------
- # TYPES
- # -----------------------------------------------
- type CommentProvider {
- isEnabled: Boolean!
- key: String!
- title: String!
- description: String
- logo: String
- website: String
- isAvailable: Boolean
- config: [KeyValuePair]
- }
- input CommentProviderInput {
- isEnabled: Boolean!
- key: String!
- config: [KeyValuePairInput]
- }
- type CommentPost {
- id: Int!
- content: String!
- render: String!
- authorId: Int!
- authorName: String!
- authorEmail: String! @auth(requires: ["manage:system"])
- authorIP: String! @auth(requires: ["manage:system"])
- createdAt: Date!
- updatedAt: Date!
- }
|