web & server: implement handling for text and html bodies.

This commit is contained in:
2023-11-26 16:37:29 -08:00
parent 1cdabc348b
commit 11366b6fac
4 changed files with 204 additions and 7 deletions

View File

@@ -59,6 +59,32 @@
},
"subscriptionType": null,
"types": [
{
"description": null,
"enumValues": null,
"fields": null,
"inputFields": null,
"interfaces": null,
"kind": "UNION",
"name": "Body",
"possibleTypes": [
{
"kind": "OBJECT",
"name": "UnhandledContentType",
"ofType": null
},
{
"kind": "OBJECT",
"name": "PlainText",
"ofType": null
},
{
"kind": "OBJECT",
"name": "Html",
"ofType": null
}
]
},
{
"description": "The `Boolean` scalar type represents `true` or `false`.",
"enumValues": null,
@@ -114,6 +140,33 @@
"name": "Float",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
"fields": [
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "contents",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
],
"inputFields": null,
"interfaces": [],
"kind": "OBJECT",
"name": "Html",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
@@ -221,6 +274,22 @@
"name": "Int",
"ofType": null
}
},
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "body",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "UNION",
"name": "Body",
"ofType": null
}
}
}
],
"inputFields": null,
@@ -296,6 +365,33 @@
"name": "PageInfo",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
"fields": [
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "contents",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
],
"inputFields": null,
"interfaces": [],
"kind": "OBJECT",
"name": "PlainText",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
@@ -865,6 +961,33 @@
"name": "ThreadSummaryEdge",
"possibleTypes": null
},
{
"description": null,
"enumValues": null,
"fields": [
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "contents",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
],
"inputFields": null,
"interfaces": [],
"kind": "OBJECT",
"name": "UnhandledContentType",
"possibleTypes": null
},
{
"description": "A Directive provides a way to describe alternate runtime execution and type\nvalidation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution\nbehavior in ways field arguments will not suffice, such as conditionally\nincluding or skipping a field. Directives provide this by describing\nadditional information to the executor.",
"enumValues": null,

View File

@@ -16,6 +16,18 @@ query ShowThreadQuery($threadId: String!) {
addr
}
timestamp
body {
__typename
... on UnhandledContentType {
contents
}
... on PlainText {
contents
}
... on Html {
contents
}
}
}
}
tags {