UNPKG

@platformos/pos-cli

Version:

Manage your platformOS application

119 lines (112 loc) 2.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "introspectionQuery", { enumerable: true, get: function () { return _graphql.introspectionQuery; } }); exports.introspectionQuerySansSubscriptions = exports.introspectionQueryName = void 0; var _graphql = require("graphql"); /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const introspectionQueryName = (0, _graphql.getOperationAST)((0, _graphql.parse)(_graphql.introspectionQuery)).name.value; // Some GraphQL services do not support subscriptions and fail an introspection // query which includes the `subscriptionType` field as the stock introspection // query does. This backup query removes that field. exports.introspectionQueryName = introspectionQueryName; const introspectionQuerySansSubscriptions = ` query ${introspectionQueryName} { __schema { queryType { name } mutationType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } } `; exports.introspectionQuerySansSubscriptions = introspectionQuerySansSubscriptions;