diff --git a/packages/loaders/openapi/src/bundle.ts b/packages/loaders/openapi/src/bundle.ts deleted file mode 100644 index fca6ba2217285..0000000000000 --- a/packages/loaders/openapi/src/bundle.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { - getGraphQLSchemaFromBundle, - createBundle as createJSONSchemaLoaderBundle, - JSONSchemaLoaderBundle as OpenAPILoaderBundle, -} from '@omnigraph/json-schema'; -import { getJSONSchemaOptionsFromOpenAPIOptions } from './getJSONSchemaOptionsFromOpenAPIOptions.js'; -import { OpenAPILoaderOptions } from './types.js'; - -/** - * Creates a bundle by downloading and resolving the internal references once - * to load the schema locally later - */ -export async function createBundle( - name: string, - openApiLoaderOptions: OpenAPILoaderOptions, -): Promise { - const { operations, baseUrl, cwd, fetch, schemaHeaders, operationHeaders } = - await getJSONSchemaOptionsFromOpenAPIOptions(name, openApiLoaderOptions); - return createJSONSchemaLoaderBundle(name, { - operations, - baseUrl, - cwd, - fetch, - schemaHeaders, - operationHeaders: typeof operationHeaders === 'object' ? operationHeaders : {}, - queryParams: openApiLoaderOptions.queryParams, - ignoreErrorResponses: openApiLoaderOptions.ignoreErrorResponses, - logger: openApiLoaderOptions.logger, - }); -} - -export { getGraphQLSchemaFromBundle, OpenAPILoaderBundle }; diff --git a/packages/loaders/raml/src/bundle.ts b/packages/loaders/raml/src/bundle.ts deleted file mode 100644 index e4ebc9549dfec..0000000000000 --- a/packages/loaders/raml/src/bundle.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - getGraphQLSchemaFromBundle, - createBundle as createJSONSchemaLoaderBundle, - JSONSchemaLoaderBundle as RAMLLoaderBundle, -} from '@omnigraph/json-schema'; -import { getJSONSchemaOptionsFromRAMLOptions } from './getJSONSchemaOptionsFromRAMLOptions.js'; -import { RAMLLoaderOptions } from './types.js'; - -/** - * Creates a bundle by downloading and resolving the internal references once - * to load the schema locally later - */ -export async function createBundle( - name: string, - ramlLoaderOptions: RAMLLoaderOptions, -): Promise { - const { operations, baseUrl, cwd, fetch } = await getJSONSchemaOptionsFromRAMLOptions( - ramlLoaderOptions, - ); - return createJSONSchemaLoaderBundle(name, { - ...ramlLoaderOptions, - operationHeaders: - typeof ramlLoaderOptions.operationHeaders === 'object' - ? ramlLoaderOptions.operationHeaders - : {}, - baseUrl, - operations, - cwd, - fetch, - }); -} - -export { getGraphQLSchemaFromBundle, RAMLLoaderBundle }; diff --git a/packages/types/src/config-schema.json b/packages/types/src/config-schema.json index 4054f457b4d53..c88a04977b199 100644 --- a/packages/types/src/config-schema.json +++ b/packages/types/src/config-schema.json @@ -841,7 +841,7 @@ }, "subscriptionsEndpoint": { "type": "string", - "description": "URL of custom endpoint for websocket connection for subscriptions" + "description": "URL to your endpoint serving all subscription queries for this source" }, "retry": { "type": "integer", diff --git a/packages/types/src/config.ts b/packages/types/src/config.ts index a6ed9a2b52c75..3f14edd4a49d4 100644 --- a/packages/types/src/config.ts +++ b/packages/types/src/config.ts @@ -232,7 +232,7 @@ export interface GraphQLHandlerHTTPConfiguration { /** * URL to your endpoint serving all subscription queries for this source */ - subscriptionsEndpoint: string; + subscriptionsEndpoint?: string; /** * Retry attempts if fails */ diff --git a/website/src/generated-markdown/GraphQLHandlerHTTPConfiguration.generated.md b/website/src/generated-markdown/GraphQLHandlerHTTPConfiguration.generated.md index aefd5f6dde05f..5f72bb191673c 100644 --- a/website/src/generated-markdown/GraphQLHandlerHTTPConfiguration.generated.md +++ b/website/src/generated-markdown/GraphQLHandlerHTTPConfiguration.generated.md @@ -16,6 +16,7 @@ You can separately give schema introspection or SDL * `subscriptionsProtocol` (type: `String (SSE | WS | LEGACY_WS)`) - SSE - Server Sent Events WS - New graphql-ws LEGACY_WS - Legacy subscriptions-transport-ws +* `subscriptionsEndpoint` (type: `String`) - URL to your endpoint serving all subscription queries for this source * `retry` (type: `Int`) - Retry attempts if fails * `timeout` (type: `Int`) - Timeout in milliseconds * `batch` (type: `Boolean`) - Enable/Disable automatic query batching \ No newline at end of file