UNPKG

@platformos/pos-cli

Version:

Manage your platformOS application

104 lines (100 loc) 2.08 kB
/** * 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. */ import { getOperationAST, parse, introspectionQuery } from 'graphql'; export { introspectionQuery } from 'graphql'; export const introspectionQueryName = getOperationAST(parse(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. export 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 } } } } } } } } `;