Commit 20db1396 authored by Max Hartmann's avatar Max Hartmann

graphql config

parent 69732d6a
......@@ -2,13 +2,9 @@
"README_schema" : "Specifies how to load the GraphQL schema that completion, error highlighting, and documentation is based on in the IDE",
"schema": {
"README_file" : "Remove 'file' to use request url below. A relative or absolute path to the JSON from a schema introspection query, e.g. '{ data: ... }' or a .graphql/.graphqls file describing the schema using GraphQL Schema Language. Changes to the file are watched.",
"file": "graphql.schema.json",
"README_request" : "To request the schema from a url instead, remove the 'file' JSON property above (and optionally delete the default graphql.schema.json file).",
"request": {
"url" : "http://--graphql-server--/path-to-schema-json-or-introspection-endpoint",
"url" : "http://localhost:8080/graphql",
"method" : "POST",
"README_postIntrospectionQuery" : "Whether to POST an introspectionQuery to the url. If the url always returns the schema JSON, set to false and consider using GET",
"postIntrospectionQuery" : true,
......@@ -35,4 +31,4 @@
}
]
}
\ No newline at end of file
}
......@@ -40,7 +40,7 @@ export class GraphQlController {
public createGraphqlMiddleware() {
const schema = buildSchema(Schema);
// Root resolver
// noinspection JSUnusedGlobalSymbols
const root = {
persons: () => this.service.findPersons()
.then((result) => result.rows),
......
mutation save {
createPerson(
firstname: "Max",
surname: "Hartmann"
) {
id
firstname
surname
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment