added string array option to creatDataSourceOptionBuilder querySelect parameter
This commit is contained in:
parent
41670e731d
commit
6a25567a26
@ -15,11 +15,14 @@ export class GraphQLDataSourceService
|
|||||||
createDataSourceOptionsBuilder<TModel, TKey>(
|
createDataSourceOptionsBuilder<TModel, TKey>(
|
||||||
queryName: string,
|
queryName: string,
|
||||||
queryInputName: string,
|
queryInputName: string,
|
||||||
querySelect: string,
|
querySelect: string | string[],
|
||||||
keyResolver: (model: TModel) => TKey,
|
keyResolver: (model: TModel) => TKey,
|
||||||
defaultCriteria: IQueryCriteria,
|
defaultCriteria: IQueryCriteria,
|
||||||
manageNotificationMessage: boolean = true) : GraphQLDataSourceOptionsBuilder<TModel, TKey>
|
manageNotificationMessage: boolean = true) : GraphQLDataSourceOptionsBuilder<TModel, TKey>
|
||||||
{
|
{
|
||||||
|
if (Array.isArray(querySelect))
|
||||||
|
querySelect = querySelect.join(' ');
|
||||||
|
|
||||||
return new GraphQLDataSourceOptionsBuilder(
|
return new GraphQLDataSourceOptionsBuilder(
|
||||||
this.apollo,
|
this.apollo,
|
||||||
queryName,
|
queryName,
|
||||||
|
Loading…
Reference in New Issue
Block a user