Skip to content

Commit

Permalink
Document subscriptions (#3525)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-tengler authored Apr 22, 2021
1 parent 0995368 commit 1de46c1
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This convention is also configurable with a fluent interface, so in most cases y
## Descriptor

Most of the capabilities of the descriptor are already documented under `Fetching Data -> Filtering`.
If you have not done this already, it is now the right time to head over to [Filtering](https://chillicream.com/docs/hotchocolate/fetching-data/filtering) and read the parts about the `FilterConventions`
If you have not done this already, it is now the right time to head over to [Filtering](/docs/hotchocolate/fetching-data/filtering) and read the parts about the `FilterConventions`

There are two things on this descriptor that are not documented in `Fetching Data`:

Expand Down Expand Up @@ -284,8 +284,7 @@ A little simplified this is what happens during visitation:
```graphql
{
users(
where: # instance[0] = x # Create SCOPE 1 with parameter x of type User
# level[0] = []
where: # level[0] = [] # instance[0] = x # Create SCOPE 1 with parameter x of type User
{
# Push property User.Company onto the scope
# instance[1] = x.Company
Expand Down
6 changes: 3 additions & 3 deletions website/src/docs/hotchocolate/api-reference/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ private static bool TryCreateStringFilter(
IFilterConvention filterConventions,
[NotNullWhen(true)] out FilterFieldDefintion? definition)
{
if (type == typeof())
if (type == typeof(string))
{
var field = new StringFilterFieldDescriptor(context, property, filterConventions);
definition = field.CreateDefinition();
Expand Down Expand Up @@ -1646,14 +1646,14 @@ public static class DateTimeFilterConventionExtensions
`DateTime` is a new filter. Hot Chocolate is only aware of its existence because of the delegate passed to `AddImplicitFilter`

```csharp
private static bool TryCreateDateTimeFiler(
private static bool TryCreateDateTimeFilter(
IDescriptorContext context,
Type type,
PropertyInfo property,
IFilterConvention filterConventions,
[NotNullWhen(true)] out FilterFieldDefintion? definition)
{
if (type == typeof())
if (type == typeof(DateTime))
{
var field = new DateTimeFilterFieldDescriptor(
context, property, filterConventions);
Expand Down
Loading

0 comments on commit 1de46c1

Please sign in to comment.