searchhut/graph/schema.graphqls

45 lines
717 B
GraphQL
Raw Normal View History

2022-07-09 13:25:27 +02:00
scalar Time
type Domain {
id: Int!
hostname: String!
authoritative: Boolean!
tags: [String!]!
}
type Page {
id: Int!
domain: Domain!
url: String!
last_indexed: Time!
title: String
language: String
description: String
author: String
excerpt: String
}
type Result {
page: Page!
"""
Provides context for this search result. The format is an HTML blob, where
HTML from the page is stripped to text-only, made HTML safe, and tokens
matching the user's search results are wrapped in <strong> tags.
"""
context: String
}
type Stats {
npages: Int!
ndomains: Int!
2022-07-11 21:38:29 +02:00
indexbytes: Int!
}
2022-07-09 13:25:27 +02:00
type Query {
# TODO: Add cursors
search(query: String!): [Result!]!
stats: Stats!
2022-07-09 13:25:27 +02:00
}