diff --git a/crates/graphql/schema.graphql b/crates/graphql/schema.graphql new file mode 100644 index 00000000..20acef86 --- /dev/null +++ b/crates/graphql/schema.graphql @@ -0,0 +1,32 @@ + + + + +type Mutation { + """ + A dummy mutation so that the mutation object is not empty + """ + hello: Boolean! +} + +type Query { + """ + A simple property which uses the DB pool and the current session + """ + username: String +} + + +type Subscription { + """ + A dump subscription to try out the websocket + """ + integers(step: Int! = 1): Int! +} + +schema { + query: Query + mutation: Mutation + subscription: Subscription +} + diff --git a/docs/config.schema.json b/docs/config.schema.json index 88241b13..bba57e79 100644 --- a/docs/config.schema.json +++ b/docs/config.schema.json @@ -80,6 +80,10 @@ { "name": "compat" }, + { + "name": "graphql", + "playground": true + }, { "name": "static" } @@ -1333,6 +1337,26 @@ } } }, + { + "description": "GraphQL endpoint", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "graphql" + ] + }, + "playground": { + "description": "Enabled the GraphQL playground", + "default": false, + "type": "boolean" + } + } + }, { "description": "OAuth-related APIs", "type": "object",