Skip to content

Commit a29dea9

Browse files
authored
Corrected some subfunction behaviors with interfaces
AddPossible*Types was working incorrectly for interfaces. Should now be corrected.
1 parent 32085d3 commit a29dea9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

graphql-server/drivers/arangodb/driver.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,10 +1577,7 @@ function addPossibleTypes(query, schema, type, ctxt = null) {
15771577
if (graphql.isInterfaceType(type)) {
15781578
let possible_types = schema.getPossibleTypes(type);
15791579
for (let i in possible_types) {
1580-
if (i != 0) {
1581-
if (use_aql) query.push(aql`,`);
1582-
else query[query.length - 1] += `,`;
1583-
}
1580+
if (i != 0) query.push(`,`);
15841581
if (ctxt !== null) {
15851582
let collectionVar = asAQLVar(getCollectionVar(possible_types[i].name, ctxt, true));
15861583
query.push(collectionVar);
@@ -1615,10 +1612,7 @@ function addPossibleEdgeTypes(query, ctxt, schema, type_name, field_name) {
16151612
if (graphql.isInterfaceType(type)) {
16161613
let possible_types = schema.getPossibleTypes(type);
16171614
for (let i in possible_types) {
1618-
if (i != 0) {
1619-
if (use_aql) query.push(aql`,`);
1620-
else query[query.length - 1] += `,`;
1621-
}
1615+
if (i != 0) query.push(`,`);
16221616
let collectionName = getEdgeCollectionName(possible_types[i].name, field_name);
16231617
let collectionVar = asAQLVar(getCollectionVar(collectionName, ctxt, true));
16241618
query.push(collectionVar);

0 commit comments

Comments
 (0)