Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/schema/schema.graphql
Show First 20 Lines • Show All 800 Lines • ▼ Show 20 Lines | type Content implements MerkleNode & Node { | ||||
""" | """ | ||||
Content status, visible or hidden | Content status, visible or hidden | ||||
""" | """ | ||||
status: String | status: String | ||||
} | } | ||||
""" | """ | ||||
Connection to search results | |||||
""" | |||||
type SearchResultConnection { | |||||
""" | |||||
List of search result edges | |||||
""" | |||||
edges: [SearchResultEdge] | |||||
""" | |||||
List of search result objects | |||||
""" | |||||
nodes: [SearchResult] | |||||
""" | |||||
Information for pagination | |||||
""" | |||||
pageInfo: PageInfo! | |||||
""" | |||||
Total number of origin objects in the connection | |||||
""" | |||||
totalCount: Int | |||||
} | |||||
type SearchResultEdge { | |||||
""" | |||||
Cursor to request the next page after the item | |||||
""" | |||||
cursor: String! | |||||
""" | |||||
Search result object | |||||
""" | |||||
node: SearchResult | |||||
} | |||||
union SearchResultTarget = Revision | Release | Branch | Content | Directory | Snapshot | Origin | |||||
""" | |||||
A search result object | |||||
""" | |||||
type SearchResult { | |||||
match: Int | |||||
result: SearchResultTarget | |||||
resultType: String | |||||
metadata: String | |||||
} | |||||
""" | |||||
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 | ||||
""" | """ | ||||
origin( | origin( | ||||
""" | """ | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | type Query { | ||||
Get the content with a SWHID | Get the content with a SWHID | ||||
""" | """ | ||||
content( | content( | ||||
""" | """ | ||||
SWHID of the content object | SWHID of the content object | ||||
""" | """ | ||||
swhid: SWHID! | swhid: SWHID! | ||||
): Content | ): Content | ||||
""" | |||||
Search the archive | |||||
""" | |||||
search( | |||||
searchTerm: String | |||||
): SearchResultConnection | |||||
} | } |