Skip to content

Commit 9d1b0e0

Browse files
Copilotxperiandri
andauthored
Fix slnx build blockers
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/89e5acaf-53c4-4e34-b7ed-ce34b90af854 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent 1645ed9 commit 9d1b0e0

6 files changed

Lines changed: 28 additions & 1932 deletions

File tree

samples/star-wars-fabulous-client/StarWars.slnx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<Project Path="StarWars.Android/StarWars.Android.fsproj">
1515
<BuildType Solution="Ad-Hoc|*" Project="Release" />
1616
<BuildType Solution="AppStore|*" Project="Release" />
17+
<Build Solution="*|Any CPU" Project="false" />
18+
<Build Solution="*|ARM" Project="false" />
19+
<Build Solution="*|iPhone" Project="false" />
20+
<Build Solution="*|iPhoneSimulator" Project="false" />
21+
<Build Solution="*|x64" Project="false" />
22+
<Build Solution="*|x86" Project="false" />
1723
<Deploy Solution="Debug|Any CPU" />
1824
<Deploy Solution="Release|Any CPU" />
1925
</Project>

samples/star-wars-fabulous-client/StarWars/Common.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ open FSharp.Data.GraphQL
55

66
module Commands =
77

8-
type GraphQLApi = GraphQLProvider<"http://localhost:8086">
8+
[<Literal>]
9+
let IntrospectionPath = "../../../tests/FSharp.Data.GraphQL.IntegrationTests/introspection.json"
10+
11+
type GraphQLApi = GraphQLProvider<IntrospectionPath>
912
let GetCharactersData = GraphQLApi.Operation<"queries/FetchCharacters.graphql">()
1013

1114
type Character = GraphQLApi.Operations.FetchCharacters.Types.CharactersFields.Character

samples/star-wars-fabulous-client/StarWars/StarWars.fsproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Update="FSharp.Core" Version="4.5.2" />
7+
<PackageReference Update="FSharp.Core" VersionOverride="4.5.2" />
88
<!-- workaround for VSMac bug https://github.com/mono/monodevelop/pull/5137 -->
99
</ItemGroup>
1010
<ItemGroup>
@@ -18,16 +18,16 @@
1818
<Compile Include="Style.fs" />
1919
<Compile Include="Common.fs" />
2020
<None Include="queries\FetchCharacters.graphql" />
21-
<PackageReference Include="Xamarin.Forms" Version="4.0.0.425677" />
22-
<PackageReference Include="Xamarin.Essentials" Version="1.0.0" />
23-
<PackageReference Include="Fabulous.Core" Version="0.35.0" />
24-
<PackageReference Include="Fabulous.CustomControls" Version="0.35.0" />
25-
<PackageReference Include="Fabulous.LiveUpdate" Version="0.35.0" />
26-
<PackageReference Include="FSharp.Core" Version="4.6.2" />
27-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
28-
<PackageReference Include="FSharp.Data.GraphQL.Client" Version="1.0.1" />
21+
<PackageReference Include="Xamarin.Forms" VersionOverride="4.0.0.425677" />
22+
<PackageReference Include="Xamarin.Essentials" VersionOverride="1.0.0" />
23+
<PackageReference Include="Fabulous.Core" VersionOverride="0.35.0" />
24+
<PackageReference Include="Fabulous.CustomControls" VersionOverride="0.35.0" />
25+
<PackageReference Include="Fabulous.LiveUpdate" VersionOverride="0.35.0" />
26+
<PackageReference Include="FSharp.Core" VersionOverride="4.6.2" />
27+
<PackageReference Include="Newtonsoft.Json" VersionOverride="13.0.1" />
28+
<PackageReference Include="FSharp.Data.GraphQL.Client" VersionOverride="1.0.1" />
2929
<Compile Include="CharacterDetailPage.fs" />
3030
<Compile Include="MainPage.fs" />
3131
<Compile Include="StarWars.fs" />
3232
</ItemGroup>
33-
</Project>
33+
</Project>

tests/FSharp.Data.GraphQL.IntegrationTests/FSharp.Data.GraphQL.IntegrationTests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
</None>
2525
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
2626
<Compile Include="Helpers.fs" />
27-
<Compile Include="OperationErrorTests.fs" />
2827
<Compile Include="TestHosts.fs" />
28+
<Compile Include="OperationErrorTests.fs" />
2929
<Compile Include="IntrospectionUpdateTests.fs" />
3030
<Compile Include="ReservedScalarNameProviderTests.fs" />
3131
<Compile Include="LocalProviderTests.fs" />

tests/FSharp.Data.GraphQL.IntegrationTests/OperationErrorTests.fs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ open FSharp.Data.GraphQL
77
open FSharp.Data.GraphQL.Client
88

99
[<Literal>]
10-
let ServerUrl = "http://localhost:8085"
10+
let IntrospectionPath = "integration-introspection.json"
1111

12-
type Provider = GraphQLProvider<ServerUrl, uploadInputTypeName="File", explicitOptionalParameters=false>
12+
type Provider = GraphQLProvider<IntrospectionPath, uploadInputTypeName="File", explicitOptionalParameters=false>
13+
14+
let connection = TestHosts.createIntegrationConnection ()
15+
let context = Provider.GetContext(serverUrl = TestHosts.integrationServerUrl, connectionFactory = fun () -> connection)
1316

1417
module ErrorOperation =
1518
let operation =
@@ -106,7 +109,7 @@ let ``Should parse all combinations of optional operation error fields`` () =
106109

107110
[<Fact; Trait("OperationError", "Integration")>]
108111
let ``Should map server error extensions and locations into operation result`` () =
109-
let result = ErrorOperation.operation.Run ()
112+
let result = ErrorOperation.operation.Run(context)
110113

111114
result.Errors.Length |> equals 1
112115

0 commit comments

Comments
 (0)