1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var graphql_1 = require("graphql");
|
4 | exports.validateIntrospection = function (schema) {
|
5 | if (!schema.__schema) {
|
6 | throw new Error('Invalid schema provided!');
|
7 | }
|
8 | };
|
9 | function introspectionToGraphQLSchema(introspectionQuery) {
|
10 | exports.validateIntrospection(introspectionQuery);
|
11 | return graphql_1.buildClientSchema(introspectionQuery);
|
12 | }
|
13 | exports.introspectionToGraphQLSchema = introspectionToGraphQLSchema;
|
14 |
|
\ | No newline at end of file |