37 lines
633 B
GraphQL
37 lines
633 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 Query {
|
||
|
# TODO: Add cursors
|
||
|
search(query: String!): [Result!]!
|
||
|
}
|