Skip to content

Commit

Permalink
updated migration guide structure
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Nov 17, 2020
1 parent 7c263e9 commit 5daa147
Showing 1 changed file with 16 additions and 6 deletions.
Expand Up @@ -89,7 +89,9 @@ app.UseRouting();
app.UseEndpoints(x => x.MapGraphQL());
```

# DataLoaders
# Schema / Resolvers

## DataLoaders

With Hot Chocolate server 11, we have embraced the new DataLoader spec version 2. With that, we have decoupled the scheduler from the DataLoader itself, meaning you now have to pass on the `IBatchScheduler` to the base implementation of the DataLoader.
Apart from that, DataLoader now uses `ValueTask` instead of `Task` when doing async work.
Expand Down Expand Up @@ -145,7 +147,7 @@ public class FooDataLoader : DataLoaderBase<Guid, Foo>
}
```

# Node Resolver
## Node Resolver

With version 11, we have reworked how Relay node types are defined. Furthermore, we added pure code-first (annotation-based) support.

Expand Down Expand Up @@ -217,7 +219,7 @@ public class MyEntityResolver

There are more variants possible, but to give an impression of the new convenience and flexibility around nodes. As a side note, if you do not want the node attribute on the domain objects, you can also now add your very own attribute or interface to mark this and rewrite that in the schema building process to the `NodeAttribute`.

# Pagination
## Pagination

The first thing to note around pagination is that we listened to a lot of feedback and have removed the `PaginationAmountType`.

Expand All @@ -243,7 +245,7 @@ Further, you can override the paging option on the resolver level.
descriptor.Field(...).UsePaging(maxPageSize = 100)...
```

# Enums
## Enum Type

HotChocolate server 11 now follows the spec recommendation with the new enum name conventions and formats the enum values by default as UPPER_SNAIL_CASE.

Expand Down Expand Up @@ -274,7 +276,7 @@ To avoid breaking changes to your schema, you will have to override the naming c
}
```

# IResolverContext.Source
## IResolverContext.Source

The source result stack was removed from the resolver context for performance reasons. If you need such a functionality, you can write a middleware that aggregates the resulting path on the scoped context.

Expand Down Expand Up @@ -658,4 +660,12 @@ New
fooRepoMock.Object);
```

A AA
// TODO : services.AddQueryRequestInterceptor((context, builder, ct)

// TODO : Testing

// TODO : Type Converter

// TODO : Serial Execution

// TODO : services.AddQueryResultSerializer<CustomQueryResultSerializer>();

0 comments on commit 5daa147

Please sign in to comment.