Skip to content

Commit

Permalink
Moved DataLoader Code to GreenDonut (#4015)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Jul 30, 2021
1 parent ec4c539 commit 0f50794
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.Threading.Tasks;

namespace HotChocolate.Fetching
namespace GreenDonut
{
/// <summary>
/// Defines a batch dispatcher that immediately dispatches batch jobs.
/// </summary>
public class AutoBatchScheduler : IAutoBatchDispatcher
public class AutoBatchScheduler : IBatchScheduler
{
/// <summary>
/// Schedules a new job to the dispatcher that is immediately executed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GreenDonut;

#nullable enable

namespace HotChocolate.Fetching
namespace GreenDonut
{
public abstract class BatchDataLoader<TKey, TValue>
: DataLoaderBase<TKey, TValue>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GreenDonut;

#nullable enable

namespace HotChocolate.Fetching
namespace GreenDonut
{
public abstract class CacheDataLoader<TKey, TValue>
: DataLoaderBase<TKey, TValue>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using GreenDonut;

#nullable enable

namespace HotChocolate.Fetching
namespace GreenDonut
{
public abstract class GroupedDataLoader<TKey, TValue>
: DataLoaderBase<TKey, TValue[]>
Expand Down
1 change: 1 addition & 0 deletions src/HotChocolate/Core/src/Fetching/FetchCacheDataLoader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
using GreenDonut;

#nullable enable

Expand Down
9 changes: 0 additions & 9 deletions src/HotChocolate/Core/src/Fetching/IAutoBatchDispatcher.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ namespace HotChocolate.Fetching
{
public class RegisterDataLoaderException : GraphQLException
{
public RegisterDataLoaderException(string message)
: base(message)
public RegisterDataLoaderException(string message) : base(message)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using GreenDonut;
using HotChocolate.Fetching;
using Xunit;

Expand Down
1 change: 0 additions & 1 deletion src/HotChocolate/Core/test/StarWars/Types/DroidType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HotChocolate.Types;
using HotChocolate.Types.Relay;
using HotChocolate.StarWars.Models;
using HotChocolate.StarWars.Resolvers;

Expand Down

0 comments on commit 0f50794

Please sign in to comment.