Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/schema/schema.graphql
Show First 20 Lines • Show All 487 Lines • ▼ Show 20 Lines | type Person { | ||||
name: BinaryString | name: BinaryString | ||||
""" | """ | ||||
User's full name | User's full name | ||||
""" | """ | ||||
fullname: BinaryString | fullname: BinaryString | ||||
} | } | ||||
""" | |||||
A snapshot branch object | |||||
""" | """ | ||||
Possible branch target objects | type Branch { | ||||
""" | """ | ||||
union BranchTarget = Revision | Release | Branch | Content | Directory | Snapshot | Branch name | ||||
""" | |||||
name: BinaryString | |||||
""" | |||||
Branch target object | |||||
""" | |||||
target: BranchTarget | |||||
} | |||||
""" | """ | ||||
Possible Branch target types | Possible Branch target types | ||||
""" | """ | ||||
enum BranchTargetType { | enum BranchTargetType { | ||||
revision | revision | ||||
release | release | ||||
alias | alias | ||||
content | content | ||||
directory | directory | ||||
snapshot | snapshot | ||||
} | } | ||||
""" | """ | ||||
A snapshot branch object | Possible branch target nodes | ||||
""" | """ | ||||
type Branch { | union BranchTargetNode = Revision | Release | Branch | Content | Directory | Snapshot | ||||
""" | """ | ||||
Branch name | A branch target object | ||||
""" | """ | ||||
name: BinaryString | type BranchTarget { | ||||
""" | |||||
Branch target type | |||||
""" | |||||
type: BranchTargetType! | |||||
""" | """ | ||||
Type of Branch target | Branch target identifier | ||||
""" | """ | ||||
targetType: BranchTargetType | identifier: ID! | ||||
""" | """ | ||||
Branch target object | Branch target node | ||||
""" | """ | ||||
target: BranchTarget | node: BranchTargetNode | ||||
} | } | ||||
""" | """ | ||||
Connection to revisions | Connection to revisions | ||||
""" | """ | ||||
type RevisionConnection { | type RevisionConnection { | ||||
""" | """ | ||||
List of revision edges | List of revision edges | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | type Revision implements SWHNode & Node { | ||||
""" | """ | ||||
Type of the revision, eg: git/hg | Type of the revision, eg: git/hg | ||||
""" | """ | ||||
type: String | type: String | ||||
""" | """ | ||||
The unique directory object that revision points to | The unique directory object that revision points to | ||||
""" | """ | ||||
# FIXME, this field could be moved to the target structure if needed | |||||
directory: Directory | directory: Directory | ||||
""" | """ | ||||
Connection to all the parents of the revision | Connection to all the parents of the revision | ||||
""" | """ | ||||
parents( | parents( | ||||
""" | """ | ||||
Returns the first _n_ elements from the list | Returns the first _n_ elements from the list | ||||
Show All 19 Lines | revisionLog( | ||||
""" | """ | ||||
Returns the page after the cursor | Returns the page after the cursor | ||||
""" | """ | ||||
after: String | after: String | ||||
): RevisionConnection | ): RevisionConnection | ||||
} | } | ||||
""" | """ | ||||
Possible release target objects | |||||
""" | |||||
union ReleaseTarget = Release | Revision | Directory | Content | |||||
""" | |||||
Possible release target types | |||||
""" | |||||
enum ReleaseTargetType { | |||||
release | |||||
revision | |||||
content | |||||
directory | |||||
} | |||||
""" | |||||
A release object | A release object | ||||
""" | """ | ||||
type Release implements SWHNode & Node { | type Release implements SWHNode & Node { | ||||
""" | """ | ||||
Unique identifier | Unique identifier | ||||
""" | """ | ||||
id: ID! | id: ID! | ||||
Show All 18 Lines | type Release implements SWHNode & Node { | ||||
author: [Person] | author: [Person] | ||||
""" | """ | ||||
Release date | Release date | ||||
""" | """ | ||||
date: Date | date: Date | ||||
""" | """ | ||||
Type of release target | Release target node | ||||
""" | """ | ||||
targetType: ReleaseTargetType | target: ReleaseTarget | ||||
} | |||||
""" | """ | ||||
Release target object | Possible release target types | ||||
""" | """ | ||||
target: ReleaseTarget | enum ReleaseTargetType { | ||||
release | |||||
revision | |||||
content | |||||
directory | |||||
} | |||||
""" | |||||
Possible release target nodes | |||||
""" | |||||
union ReleaseTargetNode = Release | Revision | Directory | Content | |||||
""" | |||||
A release target object | |||||
""" | |||||
type ReleaseTarget { | |||||
""" | |||||
Release target type | |||||
""" | |||||
type: ReleaseTargetType! | |||||
""" | |||||
Release target identifier | |||||
""" | |||||
identifier: ID! | |||||
""" | |||||
Release target SWH object | |||||
""" | |||||
node: ReleaseTargetNode | |||||
} | } | ||||
""" | """ | ||||
Connection to directory entries | Connection to directory entries | ||||
""" | """ | ||||
type DirectoryEntryConnection { | type DirectoryEntryConnection { | ||||
""" | """ | ||||
List of directory entry edges | List of directory entry edges | ||||
Show All 26 Lines | type DirectoryEntryEdge { | ||||
cursor: String! | cursor: String! | ||||
""" | """ | ||||
Directory entry object | Directory entry object | ||||
""" | """ | ||||
node: DirectoryEntry | node: DirectoryEntry | ||||
} | } | ||||
""" | |||||
A directory entry object | |||||
""" | |||||
type DirectoryEntry { | |||||
""" | |||||
The directory entry name | |||||
""" | |||||
name: BinaryString | |||||
""" | |||||
Directory entry target node | |||||
""" | |||||
target: DirectoryEntryTarget | |||||
} | |||||
""" | """ | ||||
Possible directory entry target objects | Possible directory entry target objects | ||||
""" | """ | ||||
union DirectoryEntryTarget = Directory | Content | Revision | union DirectoryEntryTargetNode = Directory | Content | Revision | ||||
""" | """ | ||||
Possible directory entry types | Possible directory entry types | ||||
""" | """ | ||||
enum DirectoryEntryTargetType { | enum DirectoryEntryTargetType { | ||||
directory | directory | ||||
content | content | ||||
revision | revision | ||||
} | } | ||||
""" | """ | ||||
A directory entry object | A directoryentry target object | ||||
""" | """ | ||||
type DirectoryEntry { | type DirectoryEntryTarget { | ||||
""" | """ | ||||
The directory entry name | Directoryentry target type | ||||
""" | """ | ||||
name: BinaryString | type: DirectoryEntryTargetType! | ||||
""" | """ | ||||
Directory entry object type; can be file, dir or rev | Directoryentry target SWHID | ||||
""" | """ | ||||
targetType: DirectoryEntryTargetType | identifier: ID! | ||||
""" | """ | ||||
Directory entry target object | Directoryentry target SWH object | ||||
""" | """ | ||||
target: DirectoryEntryTarget | node: DirectoryEntryTargetNode | ||||
} | } | ||||
""" | """ | ||||
A directory object | A directory object | ||||
""" | """ | ||||
type Directory implements SWHNode & Node { | type Directory implements SWHNode & Node { | ||||
""" | """ | ||||
Unique identifier | Unique identifier | ||||
""" | """ | ||||
id: ID! | id: ID! | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | type SearchResultEdge { | ||||
# cursor: String! | # cursor: String! | ||||
""" | """ | ||||
SearchResult object | SearchResult object | ||||
""" | """ | ||||
node: SearchResult | node: SearchResult | ||||
} | } | ||||
union SearchResultTarget = Origin | Revision | Release | Content | Directory | Snapshot | |||||
""" | |||||
A SearchResult object | |||||
""" | |||||
type SearchResult { | |||||
""" | |||||
Result target object | |||||
""" | |||||
target: SearchResultTarget | |||||
} | |||||
""" | |||||
Possible search result target types | |||||
""" | |||||
enum SearchResultTargetType { | enum SearchResultTargetType { | ||||
origin | origin | ||||
revision | revision | ||||
release | release | ||||
content | content | ||||
directory | directory | ||||
snapshot | snapshot | ||||
} | } | ||||
""" | """ | ||||
A SearchResult object | Possible search result target nodes | ||||
""" | """ | ||||
type SearchResult { | union SearchResultTargetNode = Origin | Revision | Release | Content | Directory | Snapshot | ||||
""" | |||||
A search target object | |||||
""" | """ | ||||
Result target type | type SearchResultTarget { | ||||
""" | """ | ||||
targetType: SearchResultTargetType | Search result target type | ||||
""" | |||||
type: SearchResultTargetType | |||||
""" | """ | ||||
Result target object | Search result target identifier | ||||
""" | """ | ||||
target: SearchResultTarget | identifier: ID! | ||||
""" | |||||
Search result target SWH object | |||||
""" | |||||
node: SearchResultTargetNode | |||||
} | } | ||||
""" | """ | ||||
The query root of the GraphQL interface. | The query root of the GraphQL interface. | ||||
""" | """ | ||||
type Query { | type Query { | ||||
""" | """ | ||||
Get an origin with its url | Get an origin with its url | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |