last ...
This commit is contained in:
@@ -41,15 +41,14 @@ namespace xDataService.GraphQL {
|
||||
name: helper.GetInQuerySingleName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.GetIdArgument<TGraphKey> (),
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument,
|
||||
XGraphQLHelper.ContainsDetailArgument
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve : async context =>
|
||||
await repository
|
||||
.GetAsync (
|
||||
.GetAsync (
|
||||
includeBuilder: null,
|
||||
id: context.GetIdArgument<TKey> (),
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument (),
|
||||
containsDetail: context.GetContainsDetailArgument ()
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
.ToDynamicObject ()
|
||||
);
|
||||
@@ -59,14 +58,14 @@ namespace xDataService.GraphQL {
|
||||
FieldAsync<ListGraphType<TGraph>> (
|
||||
name: helper.GetInQueryCollectionName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument,
|
||||
XGraphQLHelper.ContainsDetailArgument
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve : async context =>
|
||||
await repository
|
||||
.GetAllAsync (
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument (),
|
||||
containsDetail: context.GetContainsDetailArgument ()
|
||||
orderBuilder: null,
|
||||
includeBuilder: null,
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
.ToDynamicObject ()
|
||||
);
|
||||
@@ -77,8 +76,7 @@ namespace xDataService.GraphQL {
|
||||
name: helper.GetFindOneName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.SearchQueryArgument,
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument,
|
||||
XGraphQLHelper.ContainsDetailArgument
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve : async (context) => {
|
||||
//
|
||||
@@ -89,9 +87,9 @@ namespace xDataService.GraphQL {
|
||||
//
|
||||
return await repository
|
||||
.FindOneAsync (
|
||||
whereClause: whereClase,
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument (),
|
||||
containsDetail: context.GetContainsDetailArgument ()
|
||||
includeBuilder: null,
|
||||
predicate: whereClase,
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
.ToDynamicObject ();
|
||||
}
|
||||
@@ -103,8 +101,7 @@ namespace xDataService.GraphQL {
|
||||
name: helper.GetFindManyName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.SearchQueryArgument,
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument,
|
||||
XGraphQLHelper.ContainsDetailArgument
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve : async (context) => {
|
||||
//
|
||||
@@ -115,9 +112,10 @@ namespace xDataService.GraphQL {
|
||||
//
|
||||
return await repository
|
||||
.FindManyAsync (
|
||||
whereClause: whereClase,
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument (),
|
||||
containsDetail: context.GetContainsDetailArgument ()
|
||||
orderBuilder: null,
|
||||
includeBuilder: null,
|
||||
predicate: whereClase,
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
.ToDynamicObject ();
|
||||
}
|
||||
@@ -134,6 +132,9 @@ namespace xDataService.GraphQL {
|
||||
resolve : async context =>
|
||||
await repository
|
||||
.QueryAsync (
|
||||
predicate: null,
|
||||
orderBuilder: null,
|
||||
includeBuilder: null,
|
||||
query: context.GetQueryArgument (),
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
@@ -144,9 +145,14 @@ namespace xDataService.GraphQL {
|
||||
// Count ...
|
||||
FieldAsync<IntGraphType> (
|
||||
name: helper.GetCountName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve: async context =>
|
||||
await repository
|
||||
.CountAsync ()
|
||||
.CountAsync (
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
);
|
||||
|
||||
//
|
||||
@@ -154,11 +160,13 @@ namespace xDataService.GraphQL {
|
||||
FieldAsync<BooleanGraphType> (
|
||||
name: helper.GetExistsName (),
|
||||
arguments: new QueryArguments (
|
||||
XGraphQLHelper.GetIdArgument<TGraphKey> ()
|
||||
XGraphQLHelper.GetIdArgument<TGraphKey> (),
|
||||
XGraphQLHelper.IgnoreSoftDeletedArgument
|
||||
),
|
||||
resolve : async context =>
|
||||
await repository.IsExistsAsync (
|
||||
context.GetIdArgument<TKey> ()
|
||||
id: context.GetIdArgument<TKey> (),
|
||||
ignoreSoftDeleteds: context.GetIgnoreSoftDeletedArgument ()
|
||||
)
|
||||
);
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user