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; }) ); }