snooze: add UI elements and DB for snooze functionality

This commit is contained in:
2025-07-13 08:53:50 -07:00
parent 52b19365d7
commit 90ac9a1e43
11 changed files with 210 additions and 67 deletions

View File

@@ -51,7 +51,7 @@
},
{
"args": [],
"description": "Indicates that an Input Object is a OneOf Input Object (and thus requires\n exactly one of its field be provided)",
"description": "Indicates that an Input Object is a OneOf Input Object (and thus requires exactly one of its field be provided)",
"locations": [
"INPUT_OBJECT"
],
@@ -107,12 +107,14 @@
}
],
"mutationType": {
"name": "Mutation"
"name": "MutationRoot"
},
"queryType": {
"name": "QueryRoot"
},
"subscriptionType": null,
"subscriptionType": {
"name": "SubscriptionRoot"
},
"types": [
{
"description": null,
@@ -314,6 +316,16 @@
"name": "Corpus",
"possibleTypes": null
},
{
"description": "Implement the DateTime<Utc> scalar\n\nThe input/output is a string in RFC3339 format.",
"enumValues": null,
"fields": null,
"inputFields": null,
"interfaces": null,
"kind": "SCALAR",
"name": "DateTime",
"possibleTypes": null
},
{
"description": null,
"enumValues": [
@@ -969,6 +981,51 @@
}
}
},
{
"args": [
{
"defaultValue": null,
"description": null,
"name": "query",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
{
"defaultValue": null,
"description": null,
"name": "wakeTime",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "DateTime",
"ofType": null
}
}
}
],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "snooze",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
},
{
"args": [],
"deprecationReason": null,
@@ -989,7 +1046,7 @@
"inputFields": null,
"interfaces": [],
"kind": "OBJECT",
"name": "Mutation",
"name": "MutationRoot",
"possibleTypes": null
},
{
@@ -1474,6 +1531,33 @@
"name": "String",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
"fields": [
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "values",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
}
}
],
"inputFields": null,
"interfaces": [],
"kind": "OBJECT",
"name": "SubscriptionRoot",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,

View File

@@ -0,0 +1,4 @@
mutation SnoozeMutation($query: String!, $wakeTime: DateTime!) {
snooze(query: $query, wakeTime: $wakeTime)
}

View File

@@ -1,4 +1,4 @@
DEV_HOST=localhost
DEV_PORT=9345
graphql-client introspect-schema http://${DEV_HOST:?}:${DEV_PORT:?}/api/graphql --output schema.json
graphql-client introspect-schema http://${DEV_HOST:?}:${DEV_PORT:?}/api/graphql/ --output schema.json
git diff schema.json