https://github.com/stefh/hotchocolate.data.extensions
Contains some "IgnoreCase" String filters for eq, contains, endsWith and startsWith.
https://github.com/stefh/hotchocolate.data.extensions
Last synced: 3 months ago
JSON representation
Contains some "IgnoreCase" String filters for eq, contains, endsWith and startsWith.
- Host: GitHub
- URL: https://github.com/stefh/hotchocolate.data.extensions
- Owner: StefH
- Created: 2021-08-28T18:50:36.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-06-22T08:36:45.000Z (12 months ago)
- Last Synced: 2025-11-27T13:03:15.967Z (7 months ago)
- Language: C#
- Homepage:
- Size: 352 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
#  HotChocolate.Data.Extensions
Contains some extra String filters like:
- `eqIgnoreCase` / `neqIgnoreCase`
- `containsIgnoreCase` / `ncontainsIgnoreCase`
- `endsWithIgnoreCase` / `nendsWithIgnoreCase`
- `startsWithIgnoreCase` / `nstartsWithIgnoreCase`
## NuGet packages
| Name | NuGet | Info |
|:- |:- |:- |
| `HotChocolate.Data.Extensions` | [](https://www.nuget.org/packages/HotChocolate.Data.Extensions) | Combined NuGet
| `HotChocolate.Data.Filters.Extensions` | [](https://www.nuget.org/packages/HotChocolate.Data.Filters.Extensions) | Contains only extensions for Filters
## Usage "HotChocolate.Data.Filters.Extensions"
### Register in your Startup.cs
``` c#
.AddGraphQLServer()
// ...
// Add filtering and sorting capabilities.
.AddExtendedFiltering() // 👈 Instead of .AddFiltering()
// ...
```
### Use in GraphQL
Now you can write GraphQL like this:
``` gql
query GetCharactersWithPaging1(
$take: Int
$skip: Int
$order: [ICharacterSortInput!]
) {
charactersWithPagingFilteringAndSorting(
take: $take
skip: $skip
where: { name: { containsIgnoreCase: "c" } } # 👈 instead of contains
order: $order
) {
items {
...c
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
query GetCharactersWithPaging2(
$take: Int
$skip: Int
$order: [ICharacterSortInput!]
) {
charactersWithPagingFilteringAndSorting(
take: $take
skip: $skip
where: { name: { eqIgnoreCase: "c-3PO" } } # 👈 instead of eq
order: $order
) {
items {
...c
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
fragment c on Character {
id
name
height
appearsIn
}
```
## Sponsors
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=StefH) and [Dapper Plus](https://dapper-plus.net/?utm_source=StefH) are major sponsors and proud to contribute to the development of **HotChocolate.Data.Extensions** and **HotChocolate.Data.Filters.Extensions**.
[](https://entityframework-extensions.net/bulk-insert?utm_source=StefH)
[](https://dapper-plus.net/bulk-insert?utm_source=StefH)