Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Represents the data model in the system.
- """
- type Book {
- """
- Model ID. It is important that the field containing the model ID has a
- uniform name (as opposed to `rdfSubject`, as we have in the `Node` model now).
- """
- id: ID!
- """
- The string field.
- """
- title: String!
- """
- The date time field.
- """
- createdAt: DateTime!
- }
- """
- Represents the collection of rules for filtering the list of models. All rules
- in this collection will be applied via logical AND.
- The rules within this collection can be divided into groups. Each of the groups
- refers to a specific property of the data model. The set of rules within a
- group is determined by property type.
- """
- input BookFilters {
- """
- The identifier is strictly equal to the specified value. This is the only
- rule for a field of type ID.
- """
- id: ID
- """
- The string is strictly equal to the specified value.
- """
- title: String
- """
- The string starts with the specified value.
- """
- titleStartsWith: String
- """
- The string ends with the specified value.
- """
- titleEndsWith: String
- """
- The string contains the specified value.
- """
- titleContains: String
- """
- The time is strictly equal to the specified value.
- """
- createdAt: DateTime
- """
- The time is greater than or equal to the specified value.
- """
- createdAtGreaterThanOrEqual: DateTime
- """
- The time is greater than the specified value.
- """
- createdAtGreaterThan: DateTime
- """
- The time is less than or equal to the specified value.
- """
- createdAtLessThanOrEqual: DateTime
- """
- The time is less than the specified value.
- """
- createdAtLessThan: DateTime
- }
- """
- An enumeration of the model properties by which sorting is available.
- """
- enum BookSortingField {
- ID
- TITLE
- CREATED_AT
- UPDATED_AT
- }
- """
- Represents the direction of the sort.
- """
- enum BookSortingOrder {
- DESC
- ASC
- }
- """
- Describes the sorting rule for the list of models.
- """
- input BookSorting {
- """
- The model field by which the list should be sorted.
- """
- field: BookSortingField!
- """
- The direction of the sort.
- """
- order: BookSortingOrder!
- }
- """
- Represents a paging rule.
- """
- input BookSlicing {
- """
- Page number (numbering starts from zero).
- """
- page: Integer!
- """
- The maximum number of items per page.
- """
- size: Integer!
- }
- """
- Represents the options for getting the list of models.
- """
- input BookOptions {
- """
- List of rule collections for filtering the list. If the rules for filtering
- are applied through a logical AND within a separate collection, then a
- logical OR is used in this list of collections (that is
- `BookFilersA OR BookFiltersB OR BookFiltersC`).
- """
- filters: [BookFilters!]
- """
- A list of collections of filtering rules that is used to exclude models
- from the list. Collections of rules will be also applied via logical OR.
- """
- exclude: [BookFilters!]
- """
- List of rules for sorting the list of models.
- """
- sorting: [BookSorting!]
- """
- List pagination rules.
- """
- slicing: BookSlicing!
- }
- """
- Represents a list of models.
- """
- type BookList {
- """
- The total number of models that match the filtering conditions.
- """
- count: Int!
- """
- List of models to be displayed on the described page.
- """
- items: [Book!]
- }
- extend type Query {
- """
- Returns the number of models in the list without getting the list itself.
- """
- booksCount(bookOptions: BookOptions!): Int!
- """
- Returns a list of models.
- """
- books(bookOptions: BookOptions!): BookList!
- """
- Returns the first model from the list. If the list is empty, it returns
- `null`.
- """
- book(bookOptions: BookOptions!): Book
- }
- input CreateBookOptions {
- title: String!
- }
- input UpdateBookOptions {
- id: ID!
- title: String
- }
- extend type Mutation {
- createBooks(options: [CreateBookOptions!]): [Book!]
- updateBooks(options: [UpdateBookOptions!]): [Book!]
- deleteBooks(ids: [ID!]): void
- createBook(options: CreateBookOptions!): Book!
- updateBook(options: UpdateBookOptions!): Book!
- deleteBook(id: ID!): void
- }
Add Comment
Please, Sign In to add comment