This commit is contained in:
Mathias Beaulieu-Duncan
2020-03-10 10:08:45 -04:00
parent a7e2454833
commit 4e40ecac91
3 changed files with 67 additions and 27 deletions
@@ -8,9 +8,7 @@ import { Observable, throwError, of } from 'rxjs';
import { FetchResult } from 'apollo-link';
import { ApolloError } from 'apollo-client';
export class GraphQLDataSourceOptionsBuilder<TModel, TKey> {
private _commands: { [key: string] : IDataSourceCommandAdapterOptions<any> } = {};
private _beforeRead: (TQuery: IGraphQLAdvanceQueryInput<TModel>) => Observable<IGraphQLAdvanceQueryInput<TModel>>;
@@ -211,6 +209,7 @@ export class GraphQLDataSourceOptionsBuilder<TModel, TKey> {
return result.data[mutationName];
}),
catchError((error: any) => {
console.log(error);
// should handle bad request with exception
// should handle bad request with validation
// should handle forbidden result 403
@@ -33,5 +33,4 @@ export class GraphQLDataSourceService
manageNotificationMessage
);
}
}
}