-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into chore/try-to-fix-playwright-reset-tests
Pull in changes to deleting draft projects, necessary in order to run Playwright E2E tests more than once
- Loading branch information
Showing
75 changed files
with
2,285 additions
and
2,003 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ local.env | |
cookies.txt | ||
dump.sql | ||
test-results/ | ||
**/*.sqlite | ||
**/*.sqlite-* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
backend/LexBoxApi/GraphQL/CustomTypes/IsLanguageForgeProjectDataLoader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using LexCore.ServiceInterfaces; | ||
using LfClassicData; | ||
using MongoDB.Driver; | ||
using MongoDB.Driver.Linq; | ||
|
||
namespace LexBoxApi.GraphQL.CustomTypes; | ||
|
||
public class IsLanguageForgeProjectDataLoader : BatchDataLoader<string, bool>, IIsLanguageForgeProjectDataLoader | ||
{ | ||
private readonly SystemDbContext _systemDbContext; | ||
|
||
public IsLanguageForgeProjectDataLoader( | ||
SystemDbContext systemDbContext, | ||
IBatchScheduler batchScheduler, | ||
DataLoaderOptions? options = null) | ||
: base(batchScheduler, options) | ||
{ | ||
_systemDbContext = systemDbContext; | ||
} | ||
|
||
protected override async Task<IReadOnlyDictionary<string, bool>> LoadBatchAsync( | ||
IReadOnlyList<string> projectCodes, | ||
CancellationToken cancellationToken) | ||
{ | ||
return await MongoExtensions.ToAsyncEnumerable(_systemDbContext.Projects.AsQueryable() | ||
.Select(p => p.ProjectCode) | ||
.Where(projectCode => projectCodes.Contains(projectCode))) | ||
.ToDictionaryAsync(projectCode => projectCode, _ => true, cancellationToken); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.