extend type Stream { commits(offset: Int! = 0, limit: Int = 20): CommitCollection commit(id: String!): Object! tags(offset: Int = 0, limit: Int = 20): TagCollection tag( id: String! ): Tag branches(offset: Int = 0, limit: Int = 20): BranchCollection branch( id: String! ): Branch } type CommitCollection { totalCount: Int commits: [Object] } type TagCollection { totalCount: Int tags: [Tag] } type BranchCollection { totalCount: Int branches: [Branch] } type Object { id: String! speckleType: String! applicationId: String createdAt: DateTime totalChildrenCount: Int """ The object's description. Valid only in the case of commit objects. """ description: String """ The object's creator. Valid only in the case of commit objects. """ author: User """ Any tags that this object belongs to. Valid only in the case of commit objects. """ tag: [Tag] """ Any branches that this object belongs to. Valid only in the case of commit objects. """ branch: [Branch] """ The full object, with all its props & other things. **NOTE:** If you're requesting objects for the purpose of recreating & displaying, you probably only want to request this specific field. """ data: JSON """ Get any objects that this object references. In the case of commits, this will give you a commit's constituent objects. **NOTE**: Providing any of the two last arguments ( `query`, `orderBy` ) will trigger a different code branch that executes a much more expensive SQL query. It is not recommended to do so for basic clients that are interested in purely getting all the objects of a given commit. """ children( limit: Int! = 100, depth: Int! = 50, select: [String], cursor: String, query: [JSONObject!], orderBy: JSONObject ): ObjectCollection! } type ObjectCollection { totalCount: Int! cursor: String objects: [Object]! } enum REFERENCE_TYPE { BRANCH, TAG } interface Reference { id: String! name: String! type: REFERENCE_TYPE! description: String! author: User! createdAt: String updatedAt: String } type Branch implements Reference { id: String! type: REFERENCE_TYPE! name: String! author: User! description: String! createdAt: String updatedAt: String commits( offset: Int! = 0, limit: Int! = 20 ): CommitCollection } type Tag implements Reference { id: String! type: REFERENCE_TYPE! name: String! author: User! description: String! createdAt: String updatedAt: String commit: Object } extend type Mutation { """ Creates a special type of object, namely a commit. A commit is describes the particular shape of a data stream at one point in time. It's a collection of objects. Returns the hash of the commit. """ commitCreate( streamId: String!, commit:JSONObject! ): String! """ Creates a bunch of objects and returns their hashes. Note: data duplication is respected. Returns the hashes of the stored objects. """ objectCreate( streamId: String!, objects:[JSONObject]! ): [String]! """ Creates a branch. """ branchCreate( streamId: String!, branch: BranchCreateInput ): String """ Updates a branch. If a commit id array is present, the two get merged. """ branchUpdate( streamId: String!, branch: BranchUpdateInput ): Boolean! """ Deletes a branch. """ branchDelete( streamId: String!, branchId: String! ):Boolean! """ Creates a tag. """ tagCreate(streamId: String!, tag: TagCreateInput ): String! """ Updates a tag. """ tagUpdate(streamId: String!, tag: TagUpdateInput ): Boolean! """ Deletes a tag. """ tagDelete( streamId: String!, tagId: String! ): Boolean! } input TagCreateInput { name: String! description: String commitId: String! } input TagUpdateInput { id: String! name: String description: String commitId: String } input BranchCreateInput { name: String! description: String commits: [String] } input BranchUpdateInput { id: String! name: String description: String commits: [String] } input CommitCreateInput { """ The stream against which these objects will be created. """ streamId: String! """ The commit you want to create. """ commit: JSONObject! } input ObjectCreateInput { """ The stream against which these objects will be created. """ streamId: String! """ The objects you want to create. """ objects: [JSONObject]! }