Skip to content

Commit b4cd00f

Browse files
committed
Added payments api
1 parent d2561ef commit b4cd00f

File tree

7 files changed

+58
-35
lines changed

7 files changed

+58
-35
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Payments API Release
2+
on:
3+
push:
4+
branches: [ main ]
5+
paths:
6+
- 'src/SourceSchemas/Payments/**'
7+
- 'src/Defaults/**'
8+
- '.github/workflows/deploy-payments.yml'
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
deploy:
13+
uses: ./.github/workflows/deploy-source-schema.yml
14+
with:
15+
app_name: ccc-eu-fusion-demo-payments-api
16+
project_path: src/SourceSchemas/Payments
17+
container_port: 8080
18+
schema_file: src/SourceSchemas/Payments/schema.graphqls
19+
secrets: inherit

Directory.Build.props

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<Project>
2-
<PropertyGroup>
3-
<Nullable>enable</Nullable>
4-
<LangVersion>preview</LangVersion>
5-
<IsPackable>false</IsPackable>
6-
<NoWarn>$(NoWarn);AD0001;</NoWarn>
7-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8-
<UseArtifactsOutput>false</UseArtifactsOutput>
9-
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
10-
<TargetFramework>net9.0</TargetFramework>
11-
<ImplicitUsings>enable</ImplicitUsings>
12-
</PropertyGroup>
2+
3+
<PropertyGroup>
4+
<Nullable>enable</Nullable>
5+
<LangVersion>preview</LangVersion>
6+
<IsPackable>false</IsPackable>
7+
<NoWarn>$(NoWarn);AD0001;</NoWarn>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<UseArtifactsOutput>false</UseArtifactsOutput>
10+
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
11+
<TargetFramework>net9.0</TargetFramework>
12+
<ImplicitUsings>enable</ImplicitUsings>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<ContainerPort>8080</ContainerPort>
17+
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:9.0</ContainerBaseImage>
18+
<PublishProfile>DefaultContainer</PublishProfile>
19+
</PropertyGroup>
20+
1321
</Project>

src/SourceSchemas/Accounts/Demo.Accounts.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ContainerPort>8080</ContainerPort>
6-
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:9.0</ContainerBaseImage>
7-
<PublishProfile>DefaultContainer</PublishProfile>
8-
</PropertyGroup>
9-
103
<ItemGroup Condition="'$(ImplicitUsings)' == 'enable'">
114
<Using Include="Demo.Accounts"/>
125
<Using Include="Demo.Accounts.Data"/>

src/SourceSchemas/Inventory/Demo.Inventory.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ContainerPort>8080</ContainerPort>
6-
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:9.0</ContainerBaseImage>
7-
<PublishProfile>DefaultContainer</PublishProfile>
8-
</PropertyGroup>
9-
103
<ItemGroup Condition="'$(ImplicitUsings)' == 'enable'">
114
<Using Include="Demo.Inventory"/>
125
<Using Include="Demo.Inventory.Data"/>

src/SourceSchemas/Order/Demo.Order.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ContainerPort>8080</ContainerPort>
6-
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:9.0</ContainerBaseImage>
7-
<PublishProfile>DefaultContainer</PublishProfile>
8-
</PropertyGroup>
92

103
<ItemGroup Condition="'$(ImplicitUsings)' == 'enable'">
114
<Using Include="Demo.Order"/>

src/SourceSchemas/Payments/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
builder.Services.AddCors();
88

99
builder
10-
.AddGraphQL(Env.PaymentsApi)
10+
.AddGraphQL(Env.PaymentsApi, disableDefaultSecurity: true)
1111
.AddDefaultSettings()
1212
.AddPaymentTypes()
13-
.InitializeOnStartup(PaymentContext.SeedDataAsync);
13+
.InitializeOnStartup(PaymentContext.SeedDataAsync, skipIf: args.IsGraphQLCommand());
1414

1515
var app = builder.Build();
1616

src/SourceSchemas/Payments/schema-settings.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,24 @@
22
"name": "payments-api",
33
"transports": {
44
"http": {
5-
"url": "http://localhost:5108/graphql"
5+
"clientName": "fusion",
6+
"url": "{{API_URL}}"
7+
}
8+
},
9+
"extensions": {
10+
"nitro": {
11+
"apiId": "QXBpCmcwMTk5MGNhNWJjYjE3MjM2ODNmODZhOTQzNzM0M2QwMw=="
12+
}
13+
},
14+
"environments": {
15+
"aspire": {
16+
"API_URL": "http://localhost:5108/graphql"
17+
},
18+
"dev": {
19+
"API_URL": "https://ccc-eu-fusion-demo-order-api.internal.calmbeach-1836b252.westeurope.azurecontainerapps.io/graphql"
20+
},
21+
"prod": {
22+
"API_URL": "https://api.example.com"
623
}
724
}
825
}

0 commit comments

Comments
 (0)