Skip to content

Commit fd6b44c

Browse files
authored
Merge pull request #274 from sundersc/aggregate-codegen-fix
fix(graphql): aggregate-code-fix
2 parents a5a26a0 + b20d363 commit fd6b44c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/graphql-docs-generator/src/generator/getFields.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,16 @@ function isGraphQLAggregateField(field) {
7777
if (
7878
field &&
7979
field.name == 'aggregateItems' &&
80-
field.type?.ofType?.name == 'SearchableAggregateResult'
80+
getBaseType(field.type) == 'SearchableAggregateResult'
8181
) {
8282
return true;
8383
}
8484
return false;
85+
}
86+
87+
function getBaseType(type) {
88+
if(type && type.ofType) {
89+
return getBaseType(type.ofType);
90+
}
91+
return type?.name;
8592
}

0 commit comments

Comments
 (0)