Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Feb 18, 2024
1 parent 783ec7a commit 162faf2
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 430 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

namespace HotChocolate.Execution.Integration.DataLoader;

public class TestDataLoader : BatchDataLoader<string, string>, ITestDataLoader
public class TestDataLoader(IBatchScheduler batchScheduler, DataLoaderOptions options)
: BatchDataLoader<string, string>(batchScheduler, options), ITestDataLoader
{
public TestDataLoader(IBatchScheduler batchScheduler, DataLoaderOptions options)
: base(batchScheduler, options)
{
}

public List<IReadOnlyList<string>> Loads { get; } = [];

protected override async Task<IReadOnlyDictionary<string, string>> LoadBatchAsync(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ClassDataLoader

## Result 1

```json
{
"data": {
"a": "a",
"b": "b",
"bar": {
"c": "c"
}
},
"extensions": {
"loads": [
[
"a",
"b",
"c"
]
]
}
}
```

## Result 2

```json
{
"data": {
"a": "a"
},
"extensions": {
"loads": [
[
"a"
]
]
}
}
```

## Result 3

```json
{
"data": {
"c": "c"
},
"extensions": {
"loads": [
[
"c"
]
]
}
}
```

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ClassDataLoader_Resolve_From_DependencyInjection

## Result 1

```json
{
"data": {
"a": "a",
"b": "b"
},
"extensions": {
"loads": [
[
"a",
"b"
]
]
}
}
```

## Result 2

```json
{
"data": {
"a": "a"
},
"extensions": {
"loads": [
[
"a"
]
]
}
}
```

## Result 3

```json
{
"data": {
"c": "c"
},
"extensions": {
"loads": [
[
"c"
]
]
}
}
```

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DataLoader_Request_Ensures_That_There_Is_A_Single_Instance

```json
{
"data": {
"a": "abc1",
"b": "abc1",
"c": "abc1",
"d": "abc1",
"e": "abc1"
}
}
```
Loading

0 comments on commit 162faf2

Please sign in to comment.