From a6e3f0999ea6a42eca8f8669622dee6c903cf1ed Mon Sep 17 00:00:00 2001 From: David Lebee Date: Fri, 6 Dec 2019 14:33:38 -0600 Subject: [PATCH] data source options builder --- .../src/lib/GraphQLDataSourceOptionsBuilder.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/poweredsoft/ngx-data-apollo/src/lib/GraphQLDataSourceOptionsBuilder.ts b/projects/poweredsoft/ngx-data-apollo/src/lib/GraphQLDataSourceOptionsBuilder.ts index 6720a66..860d195 100644 --- a/projects/poweredsoft/ngx-data-apollo/src/lib/GraphQLDataSourceOptionsBuilder.ts +++ b/projects/poweredsoft/ngx-data-apollo/src/lib/GraphQLDataSourceOptionsBuilder.ts @@ -40,6 +40,7 @@ export class GraphQLDataSourceOptionsBuilder { let ret: IDataSourceQueryAdapterOptions = { adapter: >{ handle: (query: IQueryCriteria) => { + const advanceQuery = this.createGraphQLQueryCriteria(query); const o$ = this.apollo.query({ query: this.createGraphQLQuery(query), @@ -47,14 +48,11 @@ export class GraphQLDataSourceOptionsBuilder { criteria: advanceQuery } }); + return o$.pipe( map(result => { const queryResult = result.data[this.queryName] as IGraphQLAdvanceQueryResult; return this.queryResultFromGraphQLAdvancedResult(query, queryResult); - }), - catchError(err => { - console.error(err); - return err; }) ); }