diff --git a/src/connector.ts b/src/connector.ts index 1120086..83ee9eb 100644 --- a/src/connector.ts +++ b/src/connector.ts @@ -357,17 +357,19 @@ export const connector: sdk.Connector = request: sdk.QueryRequest ): Promise { - const rows = []; + const rowSets: sdk.RowSet[] = []; for(const variables of request.variables ?? [{}]) { const args = resolveArguments(request.collection, request.arguments, variables); const result = await query(configuration, state, request.collection, args, request.query.fields ?? null); - rows.push({ '__value': result }); + rowSets.push({ + aggregates: {}, + rows: [ + { '__value': result } + ] + }); } - return [{ - aggregates: {}, - rows - }]; + return rowSets; }, async mutation( diff --git a/src/sdk.ts b/src/sdk.ts index 4cd522e..2a1d331 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -1,4 +1,4 @@ // Have this dependency defined in one place -export * as sdk from 'npm:@hasura/ndc-sdk-typescript@1.2.6'; \ No newline at end of file +export * as sdk from 'npm:@hasura/ndc-sdk-typescript@1.2.8';