1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.GraphQLServiceProject = exports.isServiceProject = void 0;
|
4 | const base_1 = require("./base");
|
5 | const fileSet_1 = require("../fileSet");
|
6 | function isServiceProject(project) {
|
7 | return project instanceof GraphQLServiceProject;
|
8 | }
|
9 | exports.isServiceProject = isServiceProject;
|
10 | class GraphQLServiceProject extends base_1.GraphQLProject {
|
11 | constructor({ clientIdentity, config, rootURI, loadingHandler, }) {
|
12 | const fileSet = new fileSet_1.FileSet({
|
13 | rootURI: config.configDirURI || rootURI,
|
14 | includes: [
|
15 | ...config.service.includes,
|
16 | ".env",
|
17 | "apollo.config.js",
|
18 | "apollo.config.cjs",
|
19 | ],
|
20 | excludes: config.service.excludes,
|
21 | configURI: config.configURI,
|
22 | });
|
23 | super({ config, fileSet, loadingHandler, clientIdentity });
|
24 | this.config = config;
|
25 | }
|
26 | get displayName() {
|
27 | return this.config.graph || "Unnamed Project";
|
28 | }
|
29 | initialize() {
|
30 | return [];
|
31 | }
|
32 | validate() { }
|
33 | getProjectStats() {
|
34 | return { loaded: true, type: "service" };
|
35 | }
|
36 | resolveFederationInfo() {
|
37 | return this.schemaProvider.resolveFederatedServiceSDL();
|
38 | }
|
39 | }
|
40 | exports.GraphQLServiceProject = GraphQLServiceProject;
|
41 |
|
\ | No newline at end of file |