MCPcopy Create free account
hub / github.com/Vincit/objection.js / _withGraph

Method _withGraph

lib/queryBuilder/QueryBuilder.js:199–208  ·  view source on GitHub ↗
(exp, options, algorithm)

Source from the content-addressed store, hash-verified

197 }
198
199 _withGraph(exp, options, algorithm) {
200 const eagerOp = ensureEagerOperation(this, algorithm);
201 const parsedExp = parseRelationExpression(this.modelClass(), exp);
202
203 eagerOp.expression = eagerOp.expression.merge(parsedExp);
204 eagerOp.graphOptions = { ...eagerOp.graphOptions, ...options };
205
206 checkEager(this);
207 return this;
208 }
209
210 allowGraph(exp) {
211 const currentExpr = this._allowedGraphExpression || RelationExpression.create();

Callers 2

withGraphFetchedMethod · 0.95
withGraphJoinedMethod · 0.95

Calls 5

ensureEagerOperationFunction · 0.85
parseRelationExpressionFunction · 0.85
checkEagerFunction · 0.85
modelClassMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected