Skip to content

Commit

Permalink
Merge pull request #418 from fsprojects/IGQLError
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri authored Oct 12, 2023
2 parents 4ad61a9 + 8f3f842 commit 1045ef5
Show file tree
Hide file tree
Showing 139 changed files with 8,402 additions and 5,773 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "5.2.0",
"version": "6.2.1",
"commands": [
"fantomas"
]
},
"fsdocs-tool": {
"version": "16.1.1",
"version": "19.1.0",
"commands": [
"fsdocs"
]
}
}
}
}
75 changes: 35 additions & 40 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ root = true
# Core EditorConfig Options #
###############################
# All files
# [*] # Do not apply to all files not to break something
[*] # Do not apply to all files not to break something
guidelines = 120 dashed, 150
# Either crlf | lf, default is system-dependent (when not specified at all)
# end_of_line=crlf
# Remove whitespace at the end of any line
Expand Down Expand Up @@ -123,11 +124,6 @@ fsharp_space_before_semicolon=false
# default true
fsharp_space_after_semicolon=true

# false: no indent after `with` in a `try-with`
# true: must indent after `with` in a `try-with`
# default false
fsharp_indent_on_try_with=false

# false: let a = [1;2;3]
# true: let a = [ 1;2;3 ]
# default true
Expand Down Expand Up @@ -187,17 +183,31 @@ fsharp_max_function_binding_width=80
# default 50
fsharp_max_dot_get_expression_width=80

# whether open/close brackets go on same colum
# false: type Range =
# { From: float
# To: float }
# true: type Range =
# {
# From: float
# To: float
# }
# default false
fsharp_multiline_block_brackets_on_same_column=false
# whether open/close brackets go on the same column
# cramped: type Range =
# { From: float
# To: float }
# aligned: type Range =
# {
# From: float
# To: float
# }
# stroustrup: type Range = {
# From: float
# To: float
# }
# default cramped
fsharp_multiline_bracket_style=stroustrup

# whether to move the beginning of compuitation expression to the new line
# true: let x =
# computation {
# ...
# }
# false: let x = computation {
# ..
# }
fsharp_newline_before_multiline_computation_expression=false

# whether a newline should be placed before members
# false: type Range =
Expand All @@ -210,18 +220,6 @@ fsharp_multiline_block_brackets_on_same_column=false
# default false
fsharp_newline_between_type_definition_and_members=true

# deprecated setting, has no effect anymore
# default false
fsharp_keep_if_then_in_same_line=true

# configures max width of Elmish expressions
# default 40
fsharp_max_elmish_width=40

# Applies to Elmish expressions
# default false
fsharp_single_argument_web_mode=false

# if a function sign exceeds max_line_length, then:
# false: do not place the equal-sign on a single line
# true: place the equal-sign on a single line
Expand All @@ -236,9 +234,6 @@ fsharp_alternative_long_member_definitions=false
# default false
fsharp_multi_line_lambda_closing_newline=false

# disables Elmish syntax parsing
fsharp_disable_elmish_syntax=true

# allows the 'else'-branch to be aligned at same level as 'else' if the ret type allows it
# false: match x with
# | null -> ()
Expand All @@ -248,22 +243,22 @@ fsharp_disable_elmish_syntax=true
# | _ ->
# ()
# default false
fsharp_experimental_keep_indent_in_branch=true
fsharp_keep_indent_in_branch=true

# multiline, nested expressions must be surrounded by blank lines
# default true
fsharp_blank_lines_around_nested_multiline_expressions=true
fsharp_blank_lines_around_nested_multiline_expressions=false

# whether a bar is placed before DU
# false: type MyDU = Short of int
# true: type MyDU = | Short of int
# default false
fsharp_bar_before_discriminated_union_declaration=false

# whether to use stroustrup style for records, lists and CEs
# To work reliably, fsharp_multiline_block_brackets_on_same_column must be "true"
fsharp_experimental_stroustrup_style=true
# multiline, nested expressions must be surrounded by blank lines
# default true
fsharp_blank_lines_around_nested_multiline_expressions=false

# from docs: Please do not use this setting for formatting hand written code!
# default false
fsharp_strict_mode=false
# set maximal number of consecutive blank lines to keep from original source
# it doesn't change number of new blank lines generated by Fantomas
fsharp_keep_max_number_of_blank_lines=2
2 changes: 2 additions & 0 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.401

- name: Add the GitHub source
run: dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/fsprojects/index.json"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.401

- name: Install local tools
run: dotnet tool restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet: [7.0.306]
dotnet: [7.0.401]
runs-on: ${{ matrix.os }}

steps:
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<PropertyGroup>
<LangVersion>7.0</LangVersion>
<FSharpCoreVersion>7.0.*</FSharpCoreVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<NoWarn>$(NoWarn);NU1504;NU1701</NoWarn>
<TreatWarningsAsErrors Condition="'$(Configuration)' != 'Debug'">true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, njlr</Authors>
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, njlr, Garrett Birkel</Authors>
<Product>FSharp.Data.GraphQL</Product>
<Summary>F# implementation of Facebook GraphQL query language</Summary>

Expand Down
7 changes: 6 additions & 1 deletion FSharp.Data.GraphQL.Integration.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33312.197
MinimumVisualStudioVersion = 15.0.26124.0
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.IntegrationTests", "tests\FSharp.Data.GraphQL.IntegrationTests\FSharp.Data.GraphQL.IntegrationTests.fsproj", "{09D910E6-94EF-46AF-94DF-10A9FEC837C0}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6D52DCCB-1899-47FB-9F7A-1571E444B4CE}"
ProjectSection(SolutionItems) = preProject
Packages.props = Packages.props
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.IntegrationTests.Server", "tests\FSharp.Data.GraphQL.IntegrationTests.Server\FSharp.Data.GraphQL.IntegrationTests.Server.fsproj", "{E6754A20-FA5E-4C76-AB1B-D35DF9526889}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.IntegrationTests", "tests\FSharp.Data.GraphQL.IntegrationTests\FSharp.Data.GraphQL.IntegrationTests.fsproj", "{09D910E6-94EF-46AF-94DF-10A9FEC837C0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Server", "src\FSharp.Data.GraphQL.Server\FSharp.Data.GraphQL.Server.fsproj", "{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Shared", "src\FSharp.Data.GraphQL.Shared\FSharp.Data.GraphQL.Shared.fsproj", "{237F9575-6E65-40DD-A77B-BA2882BD5646}"
Expand Down
31 changes: 31 additions & 0 deletions FSharp.Data.GraphQL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{6EEA0E79-693F-4D4F-B55B-DB0C64EBDA45}"
ProjectSection(SolutionItems) = preProject
jsonToGraphql.js = jsonToGraphql.js
samples\relay-modern-starter-kit\scripts\jsonToGraphql.js = samples\relay-modern-starter-kit\scripts\jsonToGraphql.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "components", "components", "{7AA3516E-60F5-4969-878F-4E3DCF3E63A3}"
ProjectSection(SolutionItems) = preProject
user.jsx = user.jsx
samples\relay-modern-starter-kit\src\components\user.jsx = samples\relay-modern-starter-kit\src\components\user.jsx
EndProjectSection
EndProject
Global
Expand Down Expand Up @@ -259,6 +261,30 @@ Global
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x64.Build.0 = Release|Any CPU
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.ActiveCfg = Release|Any CPU
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.Build.0 = Release|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -304,6 +330,11 @@ Global
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{6768EA38-1335-4B8E-BC09-CCDED1F9AAF6} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
{8FB23F61-77CB-42C7-8EEC-B22D7C4E4067} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{A47968E2-CDD1-4BCF-9093-D0C5225A815B} = {3D948D55-3CD2-496D-A04C-3B4E7BB69140}
{9D5C46E8-0C07-4384-8E58-903F7C2C7171} = {A47968E2-CDD1-4BCF-9093-D0C5225A815B}
{600D4BE2-FCE0-4684-AC6F-2DC829B395BA} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
Expand Down
16 changes: 13 additions & 3 deletions Packages.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<SystemVersion>7.0.*</SystemVersion>
<MicrosoftExtensionsVersion>7.0.*</MicrosoftExtensionsVersion>
<AspNetCoreVersion>7.0.*</AspNetCoreVersion>
<FsToolkitVersion>4.9.*</FsToolkitVersion>
<XUnitVersion>2.5.0</XUnitVersion>
<FAKEVersion>6.*</FAKEVersion>
</PropertyGroup>
<ItemGroup Label="Common">
<PackageReference Update="FParsec" Version="1.1.1" />
<!--<PackageReference Update="FSharp.Core" Version="4.7.2">-->
<PackageReference Include="FSharp.Core" Version="$(FSharpCoreVersion)">
<ExcludeAssets>contentFiles</ExcludeAssets>
</PackageReference>
<PackageReference Update="FSharp.Control.FusionTasks" Version="2.6.*" />
<PackageReference Update="FSharp.Control.Reactive" Version="5.0.*" />
<PackageReference Update="FSharp.SystemTextJson" Version="1.*" />
<PackageReference Update="FsToolkit.ErrorHandling" Version="$(FsToolkitVersion)" />
<PackageReference Update="FsToolkit.ErrorHandling.TaskResult" Version="$(FsToolkitVersion)" />
<PackageReference Update="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Update="Microsoft.NETCore.Platforms" Version="$(SystemVersion)" />
<PackageReference Update="NuGet.CommandLine" Version="1.*" />
<PackageReference Update="System.CodeDom" Version="6.*" />
<PackageReference Update="System.CodeDom" Version="$(SystemVersion)" />
<PackageReference Update="System.Collections.Immutable" Version="$(SystemVersion)" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="$(SystemVersion)" />
<PackageReference Update="System.Management" Version="6.*" />
<PackageReference Update="System.Reactive" Version="6.*" />
<PackageReference Update="System.Reactive" Version="6.*" NoWarn="NU1608" />
<PackageReference Update="System.Text.Json" Version="$(SystemVersion)" />
</ItemGroup>
<ItemGroup Label="Build">
<PackageReference Update="BlackFox.VsWhere" Version="1.1.0" />
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ let PersonType = Define.Object(
name = "Person",
fields = [
// Property resolver will be auto-generated
Define.AutoField("firstName", String)
Define.AutoField("firstName", StringType)
// Asynchronous explicit member resolver
Define.AsyncField("lastName", String, resolve = fun context person -> async { return person.LastName })
Define.AsyncField("lastName", StringType, resolve = fun context person -> async { return person.LastName })
])
// Include person as a root query of a schema
Expand Down Expand Up @@ -91,12 +91,12 @@ let customStreamDirective =
let args = [|
Define.Input(
"interval",
Nullable Int,
Nullable IntType,
defaultValue = Some 2000,
description = "An optional argument used to buffer stream results. ")
Define.Input(
"preferredBatchSize",
Nullable Int,
Nullable IntType,
defaultValue = None,
description = "An optional argument used to buffer stream results. ") |]
{ StreamDirective with Args = args }
Expand Down Expand Up @@ -424,7 +424,7 @@ As field definitions are immutable by default, generating copies of them with im

```fsharp
let field : FieldDef<'Val> = // Search for field inside ISchema
let arg : Define.Input("id", String)
let arg : Define.Input("id", StringType)
let fieldWithArg = field.WithArgs([ arg ])
```

Expand Down
2 changes: 2 additions & 0 deletions build/Build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<PackageReference Include="Fake.Tools.Git" />
<PackageReference Include="Mono.Posix.NETStandard" />
<PackageReference Include="MSBuild.StructuredLogger" />
<PackageReference Include="NuGet.Common" VersionOverride="6.*" />
<PackageReference Include="NuGet.Protocol" VersionOverride="6.*" />
</ItemGroup>

</Project>
Loading

0 comments on commit 1045ef5

Please sign in to comment.