-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New - Ajout d'un endpoint pour lister les producteurs (#5)
- Loading branch information
1 parent
dc66394
commit 1f234c0
Showing
8 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using HotChocolate.Types.Filters; | ||
using Sheaft.Application.Models; | ||
|
||
namespace Sheaft.GraphQL.Filters | ||
{ | ||
public class ProducerSummaryFilterType : FilterInputType<ProducerSummaryDto> | ||
{ | ||
protected override void Configure(IFilterInputTypeDescriptor<ProducerSummaryDto> descriptor) | ||
{ | ||
descriptor.BindFieldsExplicitly(); | ||
descriptor.Filter(c => c.Id).AllowEquals(); | ||
descriptor.Filter(c => c.Name).AllowContains(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using HotChocolate.Types.Sorting; | ||
using Sheaft.Application.Models; | ||
|
||
namespace Sheaft.GraphQL.Sorts | ||
{ | ||
public class ProducerSummarySortType : SortInputType<ProducerSummaryDto> | ||
{ | ||
protected override void Configure(ISortInputTypeDescriptor<ProducerSummaryDto> descriptor) | ||
{ | ||
descriptor.BindFieldsExplicitly(); | ||
descriptor.Sortable(c => c.Name); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters