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
|
|
|
|
}
|
|
|
|
|
2022-07-11 20:40:53 +02:00
|
|
|
type Stats {
|
|
|
|
npages: Int!
|
|
|
|
ndomains: Int!
|
|
|
|
}
|
|
|
|
|
2022-07-09 13:25:27 +02:00
|
|
|
type Query {
|
|
|
|
# TODO: Add cursors
|
|
|
|
search(query: String!): [Result!]!
|
2022-07-11 20:40:53 +02:00
|
|
|
|
|
|
|
stats: Stats!
|
2022-07-09 13:25:27 +02:00
|
|
|
}
|