1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.GraphQLSchemaHost = void 0;
|
4 | const tslib_1 = require("tslib");
|
5 | const common_1 = require("@nestjs/common");
|
6 | let GraphQLSchemaHost = class GraphQLSchemaHost {
|
7 | set schema(schemaRef) {
|
8 | this._schema = schemaRef;
|
9 | }
|
10 | get schema() {
|
11 | if (!this._schema) {
|
12 | throw new Error('GraphQL schema has not yet been created. ' +
|
13 | 'Make sure to call the "GraphQLSchemaHost#schema" getter when the application is already initialized (after the "onModuleInit" hook triggered by either "app.listen()" or "app.init()" method).');
|
14 | }
|
15 | return this._schema;
|
16 | }
|
17 | };
|
18 | exports.GraphQLSchemaHost = GraphQLSchemaHost;
|
19 | exports.GraphQLSchemaHost = GraphQLSchemaHost = tslib_1.__decorate([
|
20 | (0, common_1.Injectable)()
|
21 | ], GraphQLSchemaHost);
|