1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.removeTempField = void 0;
|
4 | /**
|
5 | * Removes "temp__" field from schema added
|
6 | * because of "merge-graphql-schemas" library issues.
|
7 | **/
|
8 | function removeTempField(schema) {
|
9 | const queryTypeRef = schema.getQueryType();
|
10 | if (!queryTypeRef) {
|
11 | return schema;
|
12 | }
|
13 | const fields = queryTypeRef.getFields();
|
14 | if (!fields) {
|
15 | return schema;
|
16 | }
|
17 | delete fields['temp__'];
|
18 | return schema;
|
19 | }
|
20 | exports.removeTempField = removeTempField;
|