UNPKG

graphcool-json-schema

Version:

JSON schema of graphcool.yml files

115 lines (114 loc) 2.72 kB
{ "$schema": "http://json-schema.org/draft-06/schema#", "title": "JSON schema for Graphcool graphcool.yml files", "definitions": { "subscription": { "description": "A piece of code that you should run.", "type": "object", "properties": { "query": { "type": "string" }, "webhook": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "url": { "type": "string" }, "headers": { "type": "object" } }, "required": ["url"] } ] } }, "required": ["query", "webhook"] } }, "properties": { "service": { "description": "Name of the Service", "type": "string", "items": { "type": "string" } }, "datamodel": { "description": "Type definitions for database models, relations, enums and other types", "type": ["string", "array"], "items": { "type": ["string", "array"] } }, "secret": { "description": "Secret for securing the API Endpoint", "type": "string", "items": { "type": "string" } }, "disableAuth": { "description": "Disable authentication for the endpoint", "type": "boolean", "items": { "type": "boolean" } }, "schema": { "description": "Path to schema.graphql for usage in the Gateway", "type": "string", "items": { "type": "string" } }, "stage": { "description": "Stage to deploy to. Read more here https://goo.gl/J5k76y", "type": "string", "items": { "type": "string" } }, "cluster": { "description": "Cluster used for deployment. Read more here https://goo.gl/J5k76y", "type": "string", "items": { "type": "string" } }, "seed": { "description": "Database seed", "type": "object", "properties": { "import": { "type": "string" }, "run": { "type": "string" } } }, "subscriptions": { "description": "All server-side subscriptions", "type": "object", "additionalProperties": { "$ref": "#/definitions/subscription" } }, "custom": { "description": "Custom field to use in variable interpolations with ${self:custom.field}", "type": "object" } }, "additionalProperties": false, "required": ["service", "datamodel", "stage"] }