UNPKG

@graphql-mesh/types

Version:
2,320 lines (2,318 loc) • 92.2 kB
/* tslint:disable */ const config = /*#__PURE__*/Object.freeze({ __proto__: null }); var definitions = { Cache: { additionalProperties: true, type: "object", title: "Cache", properties: { cfwKv: { $ref: "#/definitions/CFWorkersKVCacheConfig" }, file: { $ref: "#/definitions/FileCacheConfig" }, localforage: { $ref: "#/definitions/LocalforageConfig" }, redis: { $ref: "#/definitions/RedisConfig" } } }, CFWorkersKVCacheConfig: { additionalProperties: false, type: "object", title: "CFWorkersKVCacheConfig", properties: { namespace: { type: "string", description: "The name of the Workers KV namespace to use for caching.\n\nMake sure you have configured the following namespace described in [here](https://developers.cloudflare.com/workers/wrangler/cli-wrangler/commands/#kv)." } }, required: [ "namespace" ] }, FileCacheConfig: { additionalProperties: false, type: "object", title: "FileCacheConfig", properties: { path: { type: "string" } } }, LocalforageConfig: { additionalProperties: false, type: "object", title: "LocalforageConfig", properties: { driver: { type: "array", items: { type: "string", "enum": [ "WEBSQL", "INDEXEDDB", "LOCALSTORAGE" ], description: "Allowed values: WEBSQL, INDEXEDDB, LOCALSTORAGE" }, additionalItems: false, description: "Allowed values: WEBSQL, INDEXEDDB, LOCALSTORAGE" }, name: { type: "string" }, version: { type: "number" }, size: { type: "integer" }, storeName: { type: "string" }, description: { type: "string" } } }, RedisConfig: { additionalProperties: false, type: "object", title: "RedisConfig", properties: { host: { type: "string" }, port: { type: "string" }, password: { type: "string" }, url: { type: "string" } } }, ServeConfig: { additionalProperties: false, type: "object", title: "ServeConfig", properties: { fork: { description: "Spawn multiple server instances as node clusters (default: `1`) (Any of: Int, Boolean)", anyOf: [ { type: "integer" }, { type: "boolean" } ] }, port: { description: "TCP Port to listen (default: `4000`) (Any of: Int, String)", anyOf: [ { type: "integer" }, { type: "string" } ] }, hostname: { type: "string", description: "The binding hostname (default: `localhost`)" }, cors: { $ref: "#/definitions/CorsConfig", description: "Configuration for CORS" }, staticFiles: { type: "string", description: "Path to your static files you want to be served with GraphQL Mesh HTTP Server" }, playground: { type: "boolean", description: "Show GraphiQL Playground" }, sslCredentials: { $ref: "#/definitions/HTTPSConfig", description: "SSL Credentials for HTTPS Server\nIf this is provided, Mesh will be served via HTTPS" }, endpoint: { type: "string", description: "Path to GraphQL Endpoint (default: /graphql)" }, browser: { description: "Path to the browser that will be used by `mesh serve` to open a playground window in development mode\nThis feature can be disabled by passing `false` (Any of: String, Boolean)", anyOf: [ { type: "string" }, { type: "boolean" } ] }, customServerHandler: { type: "string", description: "If you want to use a custom GraphQL server, you can pass the path of the code file that exports a custom Mesh Server Handler\nWith a custom server handler, you won't be able to use the features of GraphQL Mesh HTTP Server" }, playgroundTitle: { type: "string", description: "Title of GraphiQL Playground" }, trustProxy: { type: "string", description: "Configure Express Proxy Handling\n[Learn more](https://expressjs.com/en/guide/behind-proxies.html)" } } }, CorsConfig: { additionalProperties: false, type: "object", title: "CorsConfig", properties: { origin: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, allowedHeaders: { type: "array", items: { type: "string" }, additionalItems: false }, exposedHeaders: { type: "array", items: { type: "string" }, additionalItems: false }, credentials: { type: "boolean" }, maxAge: { type: "integer" }, preflightContinue: { type: "boolean" }, optionsSuccessStatus: { type: "integer" } } }, HTTPSConfig: { additionalProperties: false, type: "object", title: "HTTPSConfig", properties: { key: { type: "string" }, cert: { type: "string" } }, required: [ "key", "cert" ] }, SDKConfig: { additionalProperties: false, type: "object", title: "SDKConfig", properties: { generateOperations: { $ref: "#/definitions/GenerateOperationsConfig", description: "Use this only if you don't want to use `documents` for SDK,\nand let Mesh generate them for you" } } }, GenerateOperationsConfig: { additionalProperties: false, type: "object", title: "GenerateOperationsConfig", properties: { selectionSetDepth: { type: "integer" } } }, Source: { additionalProperties: false, type: "object", title: "Source", properties: { name: { type: "string", description: "The name you wish to set to your remote API, this will be used for building the GraphQL context" }, handler: { $ref: "#/definitions/Handler", description: "Point to the handler you wish to use, it can either be a predefined handler, or a custom" }, transforms: { type: "array", items: { $ref: "#/definitions/Transform" }, additionalItems: false, description: "List of transforms to apply to the current API source, before unifying it with the rest of the sources" } }, required: [ "name", "handler" ] }, Transform: { additionalProperties: true, type: "object", title: "Transform", properties: { cache: { type: "array", items: { $ref: "#/definitions/CacheTransformConfig" }, additionalItems: false, description: "Transformer to apply caching for your data sources" }, encapsulate: { $ref: "#/definitions/EncapsulateTransformObject", description: "Transformer to apply encapsulation to the API source, by creating a field for it under the root query" }, extend: { $ref: "#/definitions/ExtendTransform" }, federation: { $ref: "#/definitions/FederationTransform" }, filterSchema: { description: "Transformer to filter (white/black list) GraphQL types, fields and arguments (Any of: FilterSchemaTransform, Any)", anyOf: [ { $ref: "#/definitions/FilterSchemaTransform" }, { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] } ] }, hoistField: { type: "array", items: { $ref: "#/definitions/HoistFieldTransformConfig" }, additionalItems: false, description: "Transformer to hoist GraphQL fields" }, namingConvention: { $ref: "#/definitions/NamingConventionTransformConfig", description: "Transformer to apply naming convention to GraphQL Types" }, prefix: { $ref: "#/definitions/PrefixTransformConfig", description: "Prefix transform" }, prune: { $ref: "#/definitions/PruneTransformConfig", description: "Prune transform" }, rateLimit: { type: "array", items: { $ref: "#/definitions/RateLimitTransformConfig" }, additionalItems: false, description: "RateLimit transform" }, rename: { description: "Transformer to rename GraphQL types and fields (Any of: RenameTransform, Any)", anyOf: [ { $ref: "#/definitions/RenameTransform" }, { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] } ] }, replaceField: { $ref: "#/definitions/ReplaceFieldTransformConfig", description: "Transformer to replace GraphQL field with partial of full config from a different field" }, resolversComposition: { description: "Transformer to apply composition to resolvers (Any of: ResolversCompositionTransform, Any)", anyOf: [ { $ref: "#/definitions/ResolversCompositionTransform" }, { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] } ] }, typeMerging: { $ref: "#/definitions/TypeMergingConfig", description: "[Type Merging](https://www.graphql-tools.com/docs/stitch-type-merging) Configuration" } } }, Handler: { additionalProperties: true, type: "object", title: "Handler", properties: { graphql: { description: "Handler for remote/local/third-party GraphQL schema (Any of: GraphQLHandlerHTTPConfiguration, GraphQLHandlerCodeFirstConfiguration, GraphQLHandlerMultipleHTTPConfiguration)", anyOf: [ { $ref: "#/definitions/GraphQLHandlerHTTPConfiguration" }, { $ref: "#/definitions/GraphQLHandlerCodeFirstConfiguration" }, { $ref: "#/definitions/GraphQLHandlerMultipleHTTPConfiguration" } ] }, grpc: { $ref: "#/definitions/GrpcHandler", description: "Handler for gRPC and Protobuf schemas" }, jsonSchema: { description: "Handler for JSON Schema specification.\nSource could be a local json file, or a url to it. (Any of: JsonSchemaHandler, JsonSchemaHandlerBundle)", anyOf: [ { $ref: "#/definitions/JsonSchemaHandler" }, { $ref: "#/definitions/JsonSchemaHandlerBundle" } ] }, mongoose: { $ref: "#/definitions/MongooseHandler" }, mysql: { $ref: "#/definitions/MySQLHandler" }, neo4j: { $ref: "#/definitions/Neo4jHandler", description: "Handler for Neo4j" }, odata: { $ref: "#/definitions/ODataHandler", description: "Handler for OData" }, openapi: { $ref: "#/definitions/OpenapiHandler", description: "Handler for Swagger / OpenAPI 2/3 specification. Source could be a local json/swagger file, or a url to it." }, postgraphile: { $ref: "#/definitions/PostGraphileHandler", description: "Handler for Postgres database, based on `postgraphile`" }, raml: { $ref: "#/definitions/RAMLHandler" }, soap: { $ref: "#/definitions/SoapHandler", description: "Handler for SOAP" }, thrift: { $ref: "#/definitions/ThriftHandler", description: "Handler for OData" }, tuql: { $ref: "#/definitions/TuqlHandler", description: "Handler for SQLite database, based on `tuql`" } } }, Plugin: { additionalProperties: true, type: "object", title: "Plugin", properties: { maskedErrors: { $ref: "#/definitions/MaskedErrorsPluginConfig" }, immediateIntrospection: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, deduplicateRequest: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, httpCache: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, httpDetailsExtensions: { $ref: "#/definitions/HTTPDetailsExtensionsConfig" }, liveQuery: { $ref: "#/definitions/LiveQueryConfig" }, mock: { $ref: "#/definitions/MockingConfig", description: "Mock configuration for your source" }, newrelic: { $ref: "#/definitions/NewrelicConfig" }, operationFieldPermissions: { $ref: "#/definitions/OperationFieldPermissionsConfig" }, prometheus: { $ref: "#/definitions/PrometheusConfig" }, rateLimit: { $ref: "#/definitions/RateLimitPluginConfig", description: "RateLimit plugin" }, responseCache: { $ref: "#/definitions/ResponseCacheConfig" }, snapshot: { $ref: "#/definitions/SnapshotPluginConfig", description: "Configuration for Snapshot extension" }, statsd: { $ref: "#/definitions/StatsdPlugin" } } }, MaskedErrorsPluginConfig: { additionalProperties: false, type: "object", title: "MaskedErrorsPluginConfig", properties: { errorMessage: { type: "string" } } }, AdditionalStitchingResolverObject: { additionalProperties: false, type: "object", title: "AdditionalStitchingResolverObject", properties: { sourceName: { type: "string" }, sourceTypeName: { type: "string" }, sourceFieldName: { type: "string" }, sourceSelectionSet: { type: "string" }, requiredSelectionSet: { type: "string" }, sourceArgs: { type: "object", properties: { } }, targetTypeName: { type: "string" }, targetFieldName: { type: "string" }, result: { type: "string", description: "Extract specific property from the result" }, resultType: { type: "string", description: "If return types don't match,\nyou can specify a result type to apply inline fragment" } }, required: [ "sourceName", "sourceTypeName", "sourceFieldName", "targetTypeName", "targetFieldName" ] }, AdditionalStitchingBatchResolverObject: { additionalProperties: false, type: "object", title: "AdditionalStitchingBatchResolverObject", properties: { sourceName: { type: "string" }, sourceTypeName: { type: "string" }, sourceFieldName: { type: "string" }, sourceSelectionSet: { type: "string" }, requiredSelectionSet: { type: "string" }, keyField: { type: "string" }, keysArg: { type: "string" }, additionalArgs: { type: "object", properties: { } }, targetTypeName: { type: "string" }, targetFieldName: { type: "string" }, result: { type: "string", description: "Extract specific property from the result" }, resultType: { type: "string", description: "If return types don't match,\nyou can specify a result type to apply inline fragment" } }, required: [ "sourceName", "sourceTypeName", "sourceFieldName", "keyField", "keysArg", "targetTypeName", "targetFieldName" ] }, AdditionalSubscriptionObject: { additionalProperties: false, type: "object", title: "AdditionalSubscriptionObject", properties: { targetTypeName: { type: "string" }, targetFieldName: { type: "string" }, pubsubTopic: { type: "string" }, result: { type: "string" }, filterBy: { type: "string" } }, required: [ "targetTypeName", "targetFieldName", "pubsubTopic" ] }, PubSubConfig: { additionalProperties: false, type: "object", title: "PubSubConfig", properties: { name: { type: "string" }, config: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] } }, required: [ "name" ] }, GraphQLHandlerMultipleHTTPConfiguration: { additionalProperties: false, type: "object", title: "GraphQLHandlerMultipleHTTPConfiguration", properties: { sources: { type: "array", items: { $ref: "#/definitions/GraphQLHandlerHTTPConfiguration" }, additionalItems: false, description: "HTTP Source Configurations" }, strategy: { type: "string", "enum": [ "fallback", "race", "highestValue" ], description: "Handling strategy (default: fallback) (Allowed values: fallback, race, highestValue)" }, strategyConfig: { $ref: "#/definitions/GraphQLHandlerhighestValueStrategyConfig", description: "Handling strategy configuration" } }, required: [ "sources" ] }, GraphQLHandlerhighestValueStrategyConfig: { additionalProperties: false, type: "object", title: "GraphQLHandlerhighestValueStrategyConfig", properties: { selectionSet: { type: "string" }, value: { type: "string" } }, required: [ "selectionSet", "value" ] }, GraphQLHandlerCodeFirstConfiguration: { additionalProperties: false, type: "object", title: "GraphQLHandlerCodeFirstConfiguration", properties: { schema: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "A file path to your GraphQL Schema\nIf you provide a path to a code file(js or ts),\nother options will be ignored and the schema exported from the file will be used directly." } }, required: [ "schema" ] }, GraphQLHandlerHTTPConfiguration: { additionalProperties: false, type: "object", title: "GraphQLHandlerHTTPConfiguration", properties: { endpoint: { type: "string", description: "A url or file path to your remote GraphQL endpoint.\nIf you provide a path to a code file(js or ts),\nother options will be ignored and the schema exported from the file will be used directly." }, schemaHeaders: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "JSON object representing the Headers to add to the runtime of the API calls only for schema introspection" }, operationHeaders: { type: "object", properties: { }, description: "JSON object representing the Headers to add to the runtime of the API calls only for operation during runtime" }, useGETForQueries: { type: "boolean", description: "Use HTTP GET for Query operations" }, method: { type: "string", "enum": [ "GET", "POST" ], description: "HTTP method used for GraphQL operations (Allowed values: GET, POST)" }, credentials: { type: "string", "enum": [ "omit", "include" ], description: "Request Credentials if your environment supports it.\n[See more](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials)\n\n@default \"same-origin\" (Allowed values: omit, include)" }, webSocketImpl: { type: "string", description: "Path to a custom W3 Compatible WebSocket Implementation" }, introspection: { type: "string", description: "Path to the introspection\nYou can separately give schema introspection" }, subscriptionsProtocol: { type: "string", "enum": [ "SSE", "WS", "LEGACY_WS" ], description: "SSE - Server Sent Events\nWS - New graphql-ws\nLEGACY_WS - Legacy subscriptions-transport-ws (Allowed values: SSE, WS, LEGACY_WS)" }, retry: { type: "integer", description: "Retry attempts if fails" }, timeout: { type: "integer", description: "Timeout in milliseconds" }, batch: { type: "boolean", description: "Enable/Disable automatic query batching" } }, required: [ "endpoint" ] }, GrpcHandler: { additionalProperties: false, type: "object", title: "GrpcHandler", properties: { endpoint: { type: "string", description: "gRPC Endpoint" }, protoFilePath: { description: "gRPC Proto file that contains your protobuf schema (Any of: ProtoFilePath, String)", anyOf: [ { $ref: "#/definitions/ProtoFilePath" }, { type: "string" } ] }, descriptorSetFilePath: { description: "Use a binary-encoded or JSON file descriptor set file (Any of: ProtoFilePath, String)", anyOf: [ { $ref: "#/definitions/ProtoFilePath" }, { type: "string" } ] }, requestTimeout: { type: "integer", description: "Request timeout in milliseconds\nDefault: 200000" }, credentialsSsl: { $ref: "#/definitions/GrpcCredentialsSsl", description: "SSL Credentials" }, useHTTPS: { type: "boolean", description: "Use https instead of http for gRPC connection" }, metaData: { type: "object", properties: { }, description: "MetaData" }, useReflection: { type: "boolean", description: "Use gRPC reflection to automatically gather the connection" }, prefixQueryMethod: { type: "array", items: { type: "string" }, additionalItems: false, description: "prefix to collect Query method default: list, get" } }, required: [ "endpoint" ] }, LoadOptions: { additionalProperties: false, type: "object", title: "LoadOptions", properties: { defaults: { type: "boolean" }, includeDirs: { type: "array", items: { type: "string" }, additionalItems: false } } }, ProtoFilePath: { additionalProperties: false, type: "object", title: "ProtoFilePath", properties: { file: { type: "string" }, load: { $ref: "#/definitions/LoadOptions" } }, required: [ "file" ] }, GrpcCredentialsSsl: { additionalProperties: false, type: "object", title: "GrpcCredentialsSsl", properties: { rootCA: { type: "string" }, certChain: { type: "string" }, privateKey: { type: "string" } } }, JsonSchemaHandlerBundle: { additionalProperties: false, type: "object", title: "JsonSchemaHandlerBundle", properties: { bundlePath: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "Path to the bundle file" }, bundleHeaders: { type: "object", properties: { }, description: "HTTP Headers to receive the bundle" }, baseUrl: { type: "string" }, operationHeaders: { description: "Any of: JSON, String", anyOf: [ { type: "object", properties: { } }, { type: "string" } ] }, queryStringOptions: { $ref: "#/definitions/QueryStringOptions" } }, required: [ "bundlePath" ] }, QueryStringOptions: { additionalProperties: false, type: "object", title: "QueryStringOptions", properties: { indices: { type: "boolean", description: "When arrays are stringified, by default they are not given explicit indices:\n`a=b&a=c&a=d`\nYou may override this by setting the indices option to true:\n`a[0]=b&a[1]=c&a[2]=d`" }, arrayFormat: { type: "string", "enum": [ "indices", "brackets", "repeat", "comma" ], description: "You can configure how to format arrays in the query strings.\n\nNote: when using arrayFormat set to 'comma', you can also pass the commaRoundTrip option set to true or false, to append [] on single-item arrays, so that they can round trip through a parse. (Allowed values: indices, brackets, repeat, comma)" }, commaRoundTrip: { type: "boolean", description: "Even if there is a single item in an array, this option treats them as arrays\n(default: false)" } } }, JsonSchemaHandler: { additionalProperties: false, type: "object", title: "JsonSchemaHandler", properties: { baseUrl: { type: "string" }, operationHeaders: { description: "Any of: JSON, String", anyOf: [ { type: "object", properties: { } }, { type: "string" } ] }, schemaHeaders: { type: "object", properties: { } }, operations: { type: "array", items: { description: "Any of: JsonSchemaHTTPOperation, JsonSchemaPubSubOperation", anyOf: [ { $ref: "#/definitions/JsonSchemaHTTPOperation" }, { $ref: "#/definitions/JsonSchemaPubSubOperation" } ] }, additionalItems: false, description: "Any of: JsonSchemaHTTPOperation, JsonSchemaPubSubOperation" }, ignoreErrorResponses: { type: "boolean" }, queryParams: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, queryStringOptions: { $ref: "#/definitions/QueryStringOptions" } }, required: [ "operations" ] }, JsonSchemaHTTPOperation: { additionalProperties: false, type: "object", title: "JsonSchemaHTTPOperation", properties: { field: { type: "string", description: "This Field based on the field name of the URL path.\nExample: \"https://MyAPIURL.com/FieldNameHere/\",\nso we will set the \"field: FieldNameHere\"." }, description: { type: "string", description: "Your chance to describe the operation!\nMake sure the description is clear and concise." }, type: { type: "string", "enum": [ "Query", "Mutation", "Subscription" ], description: "Type field is set the opertion type: Query, Mutation or Subscription. (Allowed values: Query, Mutation, Subscription)" }, requestSchema: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "Your chance to provide request schema name." }, requestSample: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "The path definition of the JSON Schema sample.\nExample: \"./jsons/questions.response.json\"." }, requestTypeName: { type: "string", description: "Inset any name for the type of the request body." }, requestBaseBody: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "This body will be merged with the request body sent with\nthe underlying HTTP request" }, responseSchema: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "Yay! Now you can provide the response schema name." }, responseSample: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "Did you use Sample? Provide the response sample path." }, responseTypeName: { type: "string", description: "Inset any name for the type of the response body." }, responseByStatusCode: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "You can define your response schemas by status codes;\n```yaml filename=\".meshrc.yaml\"\nresponseByStatusCode:\n 200:\n responseSchema: ./someschema.json#/somepath\n 404:\n responseSample: ./error-sample.json\n responseTypeName: MyError\n```" }, exposeResponseMetadata: { type: "boolean", description: "Expose response details done to the upstream API\nWhen you enable this, you will see a new field in the response type;\n```graphql\ntype MyResponseType {\n myFooField: String\n _response: ResponseMetadata\n}\n\n# And a new type for the response metadata object\ntype ResponseMetadata {\n url: URL\n status: Int\n method: String\n headers: JSON\n body: String\n}\n```" }, argTypeMap: { type: "object", properties: { }, description: "Mapping the JSON Schema and define the arguments of the operation.\n\n# Example:\nargTypeMap:\n user_id:\n type: string" }, queryParamArgMap: { type: "object", properties: { }, description: "JSON object representing the mapping of query search parameters (added to the route path) and the matching argument.\n\n# Example:\nqueryParamArgMap:\n id: user_id" }, path: { type: "string" }, method: { type: "string", "enum": [ "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH" ], description: "Allowed values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH" }, headers: { type: "object", properties: { } }, binary: { type: "boolean", description: "If true, this operation cannot have requestSchema or requestSample\nAnd the request body will be passed as binary with its mime type\nunless you define an explicit Content-Type header" } }, required: [ "field", "type", "path" ] }, JsonSchemaPubSubOperation: { additionalProperties: false, type: "object", title: "JsonSchemaPubSubOperation", properties: { field: { type: "string" }, description: { type: "string" }, type: { type: "string", "enum": [ "Query", "Mutation", "Subscription" ], description: "Allowed values: Query, Mutation, Subscription" }, requestSchema: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, requestSample: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, requestTypeName: { type: "string" }, requestBaseBody: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "This body will be merged with the request body sent with\nthe underlying HTTP request" }, responseSchema: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, responseSample: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] }, responseTypeName: { type: "string" }, argTypeMap: { type: "object", properties: { } }, pubsubTopic: { type: "string" } }, required: [ "field", "type", "pubsubTopic" ] }, MongooseHandler: { additionalProperties: false, type: "object", title: "MongooseHandler", properties: { connectionString: { type: "string" }, models: { type: "array", items: { $ref: "#/definitions/MongooseModel" }, additionalItems: false }, discriminators: { type: "array", items: { $ref: "#/definitions/MongooseModel" }, additionalItems: false } } }, MongooseModel: { additionalProperties: false, type: "object", title: "MongooseModel", properties: { name: { type: "string" }, path: { type: "string" }, options: { $ref: "#/definitions/ComposeWithMongooseOpts" } }, required: [ "name", "path" ] }, ComposeWithMongooseOpts: { additionalProperties: false, type: "object", title: "ComposeWithMongooseOpts", properties: { name: { type: "string" }, description: { type: "string" }, fields: { $ref: "#/definitions/ComposeWithMongooseFieldsOpts" }, inputType: { $ref: "#/definitions/ComposeMongooseInputType" }, resolvers: { $ref: "#/definitions/TypeConverterResolversOpts" } } }, ComposeMongooseInputType: { additionalProperties: false, type: "object", title: "ComposeMongooseInputType", properties: { name: { type: "string" }, description: { type: "string" }, fields: { $ref: "#/definitions/ComposeWithMongooseFieldsOpts" }, resolvers: { $ref: "#/definitions/TypeConverterResolversOpts" } } }, ComposeWithMongooseFieldsOpts: { additionalProperties: false, type: "object", title: "ComposeWithMongooseFieldsOpts", properties: { only: { type: "array", items: { type: "string" }, additionalItems: false }, remove: { type: "array", items: { type: "string" }, additionalItems: false }, required: { type: "array", items: { type: "string" }, additionalItems: false } } }, TypeConverterResolversOpts: { additionalProperties: false, type: "object", title: "TypeConverterResolversOpts", properties: { findById: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, findByIds: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, findOne: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, findMany: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, updateById: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, updateOne: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, updateMany: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, removeById: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, removeOne: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, removeMany: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, createOne: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, createMany: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, count: { description: "Any of: Boolean, ComposeWithMongooseResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/ComposeWithMongooseResolverOpts" } ] }, connection: { description: "Any of: Boolean, JSON", anyOf: [ { type: "boolean" }, { type: "object", properties: { } } ] }, pagination: { description: "Any of: Boolean, PaginationResolverOpts", anyOf: [ { type: "boolean" }, { $ref: "#/definitions/PaginationResolverOpts" } ] } } }, ComposeWithMongooseResolverOpts: { additionalProperties: false, type: "object", title: "ComposeWithMongooseResolverOpts", properties: { filter: { $ref: "#/definitions/FilterHelperArgsOpts" }, sort: { $ref: "#/definitions/SortHelperArgsOpts" }, limit: { $ref: "#/definitions/LimitHelperArgsOpts" }, record: { $ref: "#/definitions/RecordHelperArgsOpts" }, skip: { type: "boolean" } } }, FilterHelperArgsOpts: { additionalProperties: false, type: "object", title: "FilterHelperArgsOpts", properties: { filterTypeName: { type: "string" }, isRequired: { type: "boolean" }, onlyIndexed: { type: "boolean" }, requiredFields: { type: "array", items: { type: "string" }, additionalItems: false }, operators: { description: "Any of: Boolean, JSON", anyOf: [ { type: "boolean" }, { type: "object", properties: { } } ] }, removeFields: { type: "array", items: { type: "string" }, additionalItems: false } } }, SortHelperArgsOpts: { additionalProperties: false, type: "object", title: "SortHelperArgsOpts", properties: { sortTypeName: { type: "string" } } }, LimitHelperArgsOpts: { additionalProperties: false, type: "object", title: "LimitHelperArgsOpts", properties: { defaultValue: { type: "integer" } } }, RecordHelperArgsOpts: { additionalProperties: false, type: "object", title: "RecordHelperArgsOpts", properties: { recordTypeName: { type: "string" }, isRequired: { type: "boolean" }, removeFields: { type: "array", items: { type: "string" }, additionalItems: false }, requiredFields: { type: "array", items: { type: "string" }, additionalItems: false } } }, PaginationResolverOpts: { additionalProperties: false, type: "object", title: "PaginationResolverOpts", properties: { perPage: { type: "integer" } } }, MySQLHandler: { additionalProperties: false, type: "object", title: "MySQLHandler", properties: { host: { type: "string" }, port: { type: "integer" }, user: { type: "string" }, password: { type: "string" }, database: { type: "string" }, pool: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "Use existing `Pool` instance\nFormat: modulePath#exportName" }, tables: { type: "array", items: { type: "string" }, additionalItems: false, description: "Use specific tables for your schema" }, tableFields: { type: "array", items: { $ref: "#/definitions/TableField" }, additionalItems: false, description: "Use specific fields of specific tables" } } }, TableField: { additionalProperties: false, type: "object", title: "TableField", properties: { table: { type: "string" }, fields: { type: "array", items: { type: "string" }, additionalItems: false } }, required: [ "table", "fields" ] }, Neo4jHandler: { additionalProperties: false, type: "object", title: "Neo4jHandler", properties: { url: { type: "string", description: "URL for the Neo4j Instance e.g. neo4j://localhost" }, username: { type: "string", description: "Username for basic authentication" }, password: { type: "string", description: "Password for basic authentication" }, alwaysIncludeRelationships: { type: "boolean", description: "Specifies whether relationships should always be included in the type definitions as [relationship](https://grandstack.io/docs/neo4j-graphql-js.html#relationship-types) types, even if the relationships do not have properties." }, database: { type: "string", description: "Specifies database name" }, typeDefs: { type: "string", description: "Provide GraphQL Type Definitions instead of inferring" } }, required: [ "url", "username", "password" ] }, ODataHandler: { additionalProperties: false, type: "object", title: "ODataHandler", properties: { baseUrl: { type: "string", description: "Base URL for OData API" }, metadata: { type: "string", description: "Custom $metadata File or URL" }, operationHeaders: { type: "object", properties: { }, description: "Headers to be used with the operation requests" }, schemaHeaders: { type: "object", properties: { }, description: "Headers to be used with the $metadata requests" }, batch: { type: "string", "enum": [ "multipart", "json" ], description: "Enable batching (Allowed values: multipart, json)" }, expandNavProps: { type: "boolean", description: "Use $expand for navigation props instead of seperate HTTP requests (Default: false)" } }, required: [ "baseUrl" ] }, OpenapiHandler: { additionalProperties: false, type: "object", title: "OpenapiHandler", properties: { source: { type: "string", description: "A pointer to your API source (Support both JSON and YAML) - could be a local file, remote file or url endpoint" }, fallbackFormat: { type: "string", "enum": [ "json", "yaml", "js", "ts" ], description: "Format of the files referenced from the source file, for cases content type isn't detected automatically (Allowed values: json, yaml, js, ts)" }, baseUrl: { type: "string", description: "Specifies the URL on which all paths will be based on.\nOverrides the server object in the OAS." }, schemaHeaders: { type: "object", properties: { }, description: "If you are using a remote URL endpoint to fetch your schema, you can set headers for the HTTP request to fetch your schema." }, operationHeaders: { description: "JSON object representing the Headers to add to the runtime of the API calls (Any of: JSON, String)", anyOf: [ { type: "object", properties: { } }, { type: "string" } ] }, ignoreErrorResponses: { type: "boolean", description: "Responses are converted to a Union type grouping all possible responses.\nApplying this will ignore all responses with status code other than 2xx, resulting in simpler response types, usualy regular object type instead of union.\nDefault: false" }, selectQueryOrMutationField: { type: "array", items: { $ref: "#/definitions/OASSelectQueryOrMutationFieldConfig" }, additionalItems: false, description: "Allows to explicitly override the default operation (Query or Mutation) for any OAS operation" }, queryParams: { type: "object", properties: { }, description: "JSON object representing the query search parameters to add to the API calls" } }, required: [ "source" ] }, OASSelectQueryOrMutationFieldConfig: { additionalProperties: false, type: "object", title: "OASSelectQueryOrMutationFieldConfig", properties: { type: { type: "string", "enum": [ "query", "mutation", "Query", "Mutation" ], description: "Allowed values: query, mutation, Query, Mutation" }, fieldName: { type: "string" } }, required: [ "type", "fieldName" ] }, HTTPDetailsExtensionsConfig: { additionalProperties: false, type: "object", title: "HTTPDetailsExtensionsConfig", properties: { "if": { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ] } } }, LiveQueryConfig: { additionalProperties: false, type: "object", title: "LiveQueryConfig", properties: { invalidations: { type: "array", items: { $ref: "#/definitions/LiveQueryInvalidation" }, additionalItems: false, description: "Invalidate a query or queries when a specific operation is done without an error" }, resourceIdentifier: { type: "string", description: "Custom strategy for building resources identifiers\nBy default resource identifiers are built by concatenating the Typename with the id separated by a color (`User:1`).\n\nThis may be useful if you are using a relay compliant schema and the Typename information is not required for building a unique topic.\n\nDefault: \"{typename}:{id}\"" }, includeIdentifierExtension: { type: "boolean", description: "Whether the extensions should include a list of all resource identifiers for the latest operation result.\nAny of those can be used for invalidating and re-scheduling the operation execution.\n\nThis is mainly useful for discovering and learning what kind of topics a given query will subscribe to.\nThe default value is `true` if `DEBUG` environment variable is set" }, idFieldName: { type: "string", description: "Identifier unique field\n\nDefault: \"id\"" }, indexBy: { type: "array", items: { $ref: "#/definitions/LiveQueryIndexBy" }, additionalItems: false, description: "Specify which fields should be indexed for specific invalidations." } } }, LiveQueryInvalidation: { additionalProperties: false, type: "object", title: "LiveQueryInvalidation", properties: { field: { type: "string", description: "Path to the operation that could effect it. In a form: Mutation.something. Note that wildcard is not supported in this field." }, invalidate: { type: "array", items: { type: "string" }, additionalItems: false } }, required: [ "field", "invalidate" ] }, LiveQueryIndexBy: { additionalProperties: false, type: "object", title: "LiveQueryIndexBy", properties: { field: { type: "string" }, args: { type: "array", items: { type: "string" }, additionalItems: false } }, required: [ "field", "args" ] }, MockingConfig: { additionalProperties: false, type: "object", title: "MockingConfig", properties: { "if": { type: "boolean", description: "If this expression is truthy, mocking would be enabled\nYou can use environment variables expression, for example: `${MOCKING_ENABLED}`" }, preserveResolvers: { type: "boolean", description: "Do not mock any other resolvers other than defined in `mocks`.\nFor example, you can enable this if you don't want to mock entire schema but partially." }, mocks: { type: "array", items: { $ref: "#/definitions/MockingFieldConfig" }, additionalItems: false, description: "Mock configurations" }, initializeStore: { anyOf: [ { type: "object", additionalProperties: true }, { type: "string" }, { type: "array", additionalItems: true } ], description: "The path to the code runs before the store is attached to the schema" } } }, MockingFieldConfig: { additionalProperties: false, type: "object", title: "MockingFieldConfig", properties: { apply: { type: "string", description: "Resolver path\nExample: User.firstName" }, "if": { type: "boolean", description: "If this expression is truthy, mocking would be enabled\nYou can use environment variables expression, for example: `${MOCKING_ENABLED}`" }, faker: { type: "string", description: "Faker.js expression or function\nRead more (https://github.com/marak/Faker.js/#fakerfake)\nExample:\nfaker: `name.firstName`\nfaker: `{{ name.firstName }} {{ name.lastName }}`" }, custom: { type: "string", description: "Custom mocking\nIt can be a module or json file.\nBoth \"moduleName#exportName\" or only \"moduleName\" would work" }, length: { type: "integer", description: "Length of the mock list\nFor the list types `[ObjectType]`, how many `ObjectType` you want to return?\ndefault: 2" }, store: { $ref: "#/definitions/GetFromMockStoreConfig", description: "Get the data from the mock store" }, updateStore: { type: "array", items: { $ref: "#/definitions/UpdateMockStoreConfig" }, additionalItems: false, description: "Update the data on the mock store" } }, required: [ "apply" ] }, GetFromMockStoreConfig: { additionalProperties: false, type: "object", title: "GetFromMockStoreConfig", properties: { type: { type: "string" }, key: { type: "string" }, fieldName: { type: "string" } } }, UpdateMockStoreConfig: { additionalProperties: false, type: "object", title: "UpdateMockStoreConfig", properties: { type: { t