Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion backend/Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.21
# syntax=docker/dockerfile:1.23
# check=error=true;skip=SecretsUsedInArgOrEnv
# Available versions are listed on https://hub.docker.com/r/docker/dockerfile

Expand Down
68 changes: 34 additions & 34 deletions backend/Dockerfile.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.21
# syntax=docker/dockerfile:1.23
# check=error=true
# Available versions are listed on https://hub.docker.com/r/docker/dockerfile

Expand Down Expand Up @@ -59,14 +59,14 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get upgrade --assume-yes \
&& apt-get install \
--assume-yes \
--no-install-recommends \
curl \
make \
--assume-yes \
--no-install-recommends \
curl \
make \
&& rm \
--recursive \
--force \
/var/lib/apt/lists/*
--recursive \
--force \
/var/lib/apt/lists/*

# Install up-to-date GnuPG from the official GnuPG repository.
# For the signing-key fingerprint see https://repos.gnupg.org/deb/gnupg/noble/
Expand All @@ -76,38 +76,38 @@ RUN \
version_codename="$(env --ignore-environment bash -c '. /etc/os-release; echo $VERSION_CODENAME')" && \
apt-get update && \
apt-get install \
--assume-yes \
--no-install-recommends \
curl \
gnupg2 && \
--assume-yes \
--no-install-recommends \
curl \
gnupg2 && \
curl \
--silent \
--show-error \
"https://repos.gnupg.org/deb/gnupg/${version_codename}/gnupg-signing-key.gpg" \
| gpg --dearmor \
> /usr/share/keyrings/gnupg-keyring.gpg && \
--silent \
--show-error \
"https://repos.gnupg.org/deb/gnupg/${version_codename}/gnupg-signing-key.gpg" \
| gpg --dearmor \
> /usr/share/keyrings/gnupg-keyring.gpg && \
fingerprint=$(gpg \
--batch \
--with-colons \
--import-options show-only \
--import /usr/share/keyrings/gnupg-keyring.gpg \
| awk -F':' '$1=="fpr"{print $10}') && \
--batch \
--with-colons \
--import-options show-only \
--import /usr/share/keyrings/gnupg-keyring.gpg \
| awk -F':' '$1=="fpr"{print $10}') && \
if [ "${fingerprint}" != "${GNUPG_FINGERPRINT}" ]; then \
echo "Error: Key fingerprint mismatch, got ${fingerprint} and expected ${GNUPG_FINGERPRINT}"; \
exit 1; \
echo "Error: Key fingerprint mismatch, got ${fingerprint} and expected ${GNUPG_FINGERPRINT}"; \
exit 1; \
fi && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gnupg-keyring.gpg] https://repos.gnupg.org/deb/gnupg/${version_codename}/ ${version_codename} main" \
> /etc/apt/sources.list.d/gnupg.list && \
> /etc/apt/sources.list.d/gnupg.list && \
apt-get update && \
apt-get install \
--assume-yes \
--no-install-recommends \
dirmngr \
gnupg2 && \
--assume-yes \
--no-install-recommends \
dirmngr \
gnupg2 && \
rm \
--recursive \
--force \
/var/lib/apt/lists/*
--recursive \
--force \
/var/lib/apt/lists/*

WORKDIR /app

Expand All @@ -116,9 +116,9 @@ COPY --from=build /app/src/bin/Release/net10.0/publish ./
RUN mkdir --parents \
/root/.dotnet/corefx/cryptography/x509stores \
&& mkdir --parents \
/root/.gnupg \
/root/.gnupg \
&& chmod u=rwx,g=,o= \
/root/.gnupg
/root/.gnupg

RUN ln --symbolic ./Database.dll ./App.dll

Expand Down
44 changes: 0 additions & 44 deletions backend/create-certificates.csx

This file was deleted.

6 changes: 3 additions & 3 deletions backend/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"rollForward": false
},
"dotnet-ef": {
"version": "10.0.5",
"version": "10.0.8",
"commands": [
"dotnet-ef"
],
"rollForward": false
},
"dotnet-script": {
"version": "2.0.0",
"version": "2.0.1",
"commands": [
"dotnet-script"
],
Expand Down Expand Up @@ -66,7 +66,7 @@
"rollForward": false
},
"jetbrains.resharper.globaltools": {
"version": "2025.3.3",
"version": "2026.1.2",
"commands": [
"jb"
],
Expand Down
9 changes: 7 additions & 2 deletions backend/src/ApiRequests/ComponentDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;
Expand All @@ -16,8 +17,12 @@ public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record Component(
Guid Id
) : IIdNode<Guid>;
[property: GraphQLIgnore] Guid Id,
string Name
) : IIdNode<Guid>
{
public Guid Uuid => Id;
}

private sealed record ComponentsData(
Connection<Component>? Connection
Expand Down
8 changes: 6 additions & 2 deletions backend/src/ApiRequests/DataFormatDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;
Expand All @@ -16,12 +17,15 @@ public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record DataFormat(
Guid Id,
[property: GraphQLIgnore] Guid Id,
string Name,
string? Extension,
string MediaType,
Uri? SchemaLocator
) : IIdNode<Guid>;
) : IIdNode<Guid>
{
public Guid Uuid => Id;
}

private sealed record DataFormatsData(
Connection<DataFormat>? Connection
Expand Down
64 changes: 64 additions & 0 deletions backend/src/ApiRequests/DatabaseDataLoader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;

public sealed class DatabaseDataLoader
{
private const string QueryFileName = "Databases.graphql";

public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record Database(
[property: GraphQLIgnore] Guid Id,
string Name,
string Description,
Uri Locator,
DatabaseVerificationState VerificationState,
string VerificationCode,
DatabaseOperatorEdge Operator,
bool IsAuthorizedToUpdateNode,
bool IsAuthorizedToVerifyNode
) : IIdNode<Guid>
{
public Guid Uuid => Id;
}

public enum DatabaseVerificationState
{
PENDING,
VERIFIED
}

public sealed record DatabaseOperatorEdge(
InstitutionDataLoader.Institution Node
);

private sealed record DatabasesData(
Connection<Database>? Connection
) : IConnectionData<Database>;

[DataLoader]
public static Task<Dictionary<Guid, Database>> GetDatabaseByIdAsync(
IReadOnlyList<Guid> componentIds,
ApiRequestService apiRequestService,
AppSettings appSettings,
CancellationToken cancellationToken
)
{
return QueryByIdDataLoader.GetByIdAsync<Guid, DatabasesData, Database>(
componentIds,
[QueryFileName],
apiRequestService,
appSettings,
cancellationToken
);
}
}
9 changes: 7 additions & 2 deletions backend/src/ApiRequests/InstitutionDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;
Expand All @@ -16,8 +17,12 @@ public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record Institution(
Guid Id
) : IIdNode<Guid>;
[property: GraphQLIgnore] Guid Id,
string Name
) : IIdNode<Guid>
{
public Guid Uuid => Id;
}

private sealed record InstitutionsData(
Connection<Institution>? Connection
Expand Down
9 changes: 7 additions & 2 deletions backend/src/ApiRequests/MethodDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;
Expand All @@ -16,8 +17,12 @@ public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record Method(
Guid Id
) : IIdNode<Guid>;
[property: GraphQLIgnore] Guid Id,
string Name
) : IIdNode<Guid>
{
public Guid Uuid => Id;
}

private sealed record MethodsData(
Connection<Method>? Connection
Expand Down
9 changes: 7 additions & 2 deletions backend/src/ApiRequests/OpenIdConnectApplicationDataLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Database.Services;
using GreenDonut;
using HotChocolate;
using static Database.ApiRequests.QueryByIdDataLoader;

namespace Database.ApiRequests;
Expand All @@ -16,8 +17,12 @@ public static Uri GetGraphQlEndpoint(AppSettings appSettings) =>
QueryByIdDataLoader.GetGraphQlEndpoint(appSettings);

public sealed record OpenIdConnectApplication(
string Id
) : IIdNode<string>;
[property: GraphQLIgnore] string Id,
string Name
) : IIdNode<string>
{
string ClientId => Id;
}

private sealed record OpenIdConnectApplicationsData(
Connection<OpenIdConnectApplication>? Connection
Expand Down
2 changes: 1 addition & 1 deletion backend/src/ApiRequests/Queries/Components.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ query Components($ids: [Uuid!]!) {
edges {
node {
id: uuid
name
}
}
}
}

19 changes: 0 additions & 19 deletions backend/src/ApiRequests/Queries/Database.graphql

This file was deleted.

Loading