searchhut/graph/schema.graphqls
2022-07-11 20:40:53 +02:00

43 lines
698 B
GraphQL

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!
}
type Query {
# TODO: Add cursors
search(query: String!): [Result!]!
stats: Stats!
}