Skip to content

Commit 1045ef5

Browse files
authored
Merge pull request #418 from fsprojects/IGQLError
2 parents 4ad61a9 + 8f3f842 commit 1045ef5

File tree

139 files changed

+8402
-5773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8402
-5773
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"isRoot": true,
44
"tools": {
55
"fantomas": {
6-
"version": "5.2.0",
6+
"version": "6.2.1",
77
"commands": [
88
"fantomas"
99
]
1010
},
1111
"fsdocs-tool": {
12-
"version": "16.1.1",
12+
"version": "19.1.0",
1313
"commands": [
1414
"fsdocs"
1515
]
1616
}
1717
}
18-
}
18+
}

.editorconfig

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ root = true
33
# Core EditorConfig Options #
44
###############################
55
# All files
6-
# [*] # Do not apply to all files not to break something
6+
[*] # Do not apply to all files not to break something
7+
guidelines = 120 dashed, 150
78
# Either crlf | lf, default is system-dependent (when not specified at all)
89
# end_of_line=crlf
910
# Remove whitespace at the end of any line
@@ -123,11 +124,6 @@ fsharp_space_before_semicolon=false
123124
# default true
124125
fsharp_space_after_semicolon=true
125126

126-
# false: no indent after `with` in a `try-with`
127-
# true: must indent after `with` in a `try-with`
128-
# default false
129-
fsharp_indent_on_try_with=false
130-
131127
# false: let a = [1;2;3]
132128
# true: let a = [ 1;2;3 ]
133129
# default true
@@ -187,17 +183,31 @@ fsharp_max_function_binding_width=80
187183
# default 50
188184
fsharp_max_dot_get_expression_width=80
189185

190-
# whether open/close brackets go on same colum
191-
# false: type Range =
192-
# { From: float
193-
# To: float }
194-
# true: type Range =
195-
# {
196-
# From: float
197-
# To: float
198-
# }
199-
# default false
200-
fsharp_multiline_block_brackets_on_same_column=false
186+
# whether open/close brackets go on the same column
187+
# cramped: type Range =
188+
# { From: float
189+
# To: float }
190+
# aligned: type Range =
191+
# {
192+
# From: float
193+
# To: float
194+
# }
195+
# stroustrup: type Range = {
196+
# From: float
197+
# To: float
198+
# }
199+
# default cramped
200+
fsharp_multiline_bracket_style=stroustrup
201+
202+
# whether to move the beginning of compuitation expression to the new line
203+
# true: let x =
204+
# computation {
205+
# ...
206+
# }
207+
# false: let x = computation {
208+
# ..
209+
# }
210+
fsharp_newline_before_multiline_computation_expression=false
201211

202212
# whether a newline should be placed before members
203213
# false: type Range =
@@ -210,18 +220,6 @@ fsharp_multiline_block_brackets_on_same_column=false
210220
# default false
211221
fsharp_newline_between_type_definition_and_members=true
212222

213-
# deprecated setting, has no effect anymore
214-
# default false
215-
fsharp_keep_if_then_in_same_line=true
216-
217-
# configures max width of Elmish expressions
218-
# default 40
219-
fsharp_max_elmish_width=40
220-
221-
# Applies to Elmish expressions
222-
# default false
223-
fsharp_single_argument_web_mode=false
224-
225223
# if a function sign exceeds max_line_length, then:
226224
# false: do not place the equal-sign on a single line
227225
# true: place the equal-sign on a single line
@@ -236,9 +234,6 @@ fsharp_alternative_long_member_definitions=false
236234
# default false
237235
fsharp_multi_line_lambda_closing_newline=false
238236

239-
# disables Elmish syntax parsing
240-
fsharp_disable_elmish_syntax=true
241-
242237
# allows the 'else'-branch to be aligned at same level as 'else' if the ret type allows it
243238
# false: match x with
244239
# | null -> ()
@@ -248,22 +243,22 @@ fsharp_disable_elmish_syntax=true
248243
# | _ ->
249244
# ()
250245
# default false
251-
fsharp_experimental_keep_indent_in_branch=true
246+
fsharp_keep_indent_in_branch=true
252247

253248
# multiline, nested expressions must be surrounded by blank lines
254249
# default true
255-
fsharp_blank_lines_around_nested_multiline_expressions=true
250+
fsharp_blank_lines_around_nested_multiline_expressions=false
256251

257252
# whether a bar is placed before DU
258253
# false: type MyDU = Short of int
259254
# true: type MyDU = | Short of int
260255
# default false
261256
fsharp_bar_before_discriminated_union_declaration=false
262257

263-
# whether to use stroustrup style for records, lists and CEs
264-
# To work reliably, fsharp_multiline_block_brackets_on_same_column must be "true"
265-
fsharp_experimental_stroustrup_style=true
258+
# multiline, nested expressions must be surrounded by blank lines
259+
# default true
260+
fsharp_blank_lines_around_nested_multiline_expressions=false
266261

267-
# from docs: Please do not use this setting for formatting hand written code!
268-
# default false
269-
fsharp_strict_mode=false
262+
# set maximal number of consecutive blank lines to keep from original source
263+
# it doesn't change number of new blank lines generated by Fantomas
264+
fsharp_keep_max_number_of_blank_lines=2

.github/workflows/publish_ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727

2828
- name: Install .NET Core
2929
uses: actions/setup-dotnet@v3
30+
with:
31+
dotnet-version: 7.0.401
3032

3133
- name: Add the GitHub source
3234
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"

.github/workflows/publish_release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929

3030
- name: Install .NET Core
3131
uses: actions/setup-dotnet@v3
32+
with:
33+
dotnet-version: 7.0.401
3234

3335
- name: Install local tools
3436
run: dotnet tool restore

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, windows-latest, macOS-latest]
20-
dotnet: [7.0.306]
20+
dotnet: [7.0.401]
2121
runs-on: ${{ matrix.os }}
2222

2323
steps:

Directory.Build.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
<PropertyGroup>
55
<LangVersion>7.0</LangVersion>
66
<FSharpCoreVersion>7.0.*</FSharpCoreVersion>
7+
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
78
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
89
<NoWarn>$(NoWarn);NU1504;NU1701</NoWarn>
910
<TreatWarningsAsErrors Condition="'$(Configuration)' != 'Debug'">true</TreatWarningsAsErrors>
1011
</PropertyGroup>
1112

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

FSharp.Data.GraphQL.Integration.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.5.33312.197
55
MinimumVisualStudioVersion = 15.0.26124.0
6-
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}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6D52DCCB-1899-47FB-9F7A-1571E444B4CE}"
7+
ProjectSection(SolutionItems) = preProject
8+
Packages.props = Packages.props
9+
EndProjectSection
710
EndProject
811
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}"
912
EndProject
13+
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}"
14+
EndProject
1015
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}"
1116
EndProject
1217
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}"

FSharp.Data.GraphQL.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,13 @@ EndProject
158158
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{6EEA0E79-693F-4D4F-B55B-DB0C64EBDA45}"
159159
ProjectSection(SolutionItems) = preProject
160160
jsonToGraphql.js = jsonToGraphql.js
161+
samples\relay-modern-starter-kit\scripts\jsonToGraphql.js = samples\relay-modern-starter-kit\scripts\jsonToGraphql.js
161162
EndProjectSection
162163
EndProject
163164
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "components", "components", "{7AA3516E-60F5-4969-878F-4E3DCF3E63A3}"
164165
ProjectSection(SolutionItems) = preProject
165166
user.jsx = user.jsx
167+
samples\relay-modern-starter-kit\src\components\user.jsx = samples\relay-modern-starter-kit\src\components\user.jsx
166168
EndProjectSection
167169
EndProject
168170
Global
@@ -259,6 +261,30 @@ Global
259261
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x64.Build.0 = Release|Any CPU
260262
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.ActiveCfg = Release|Any CPU
261263
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.Build.0 = Release|Any CPU
264+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
265+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.Build.0 = Debug|Any CPU
266+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.ActiveCfg = Debug|Any CPU
267+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.Build.0 = Debug|Any CPU
268+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.ActiveCfg = Debug|Any CPU
269+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.Build.0 = Debug|Any CPU
270+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.ActiveCfg = Release|Any CPU
271+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.Build.0 = Release|Any CPU
272+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.ActiveCfg = Release|Any CPU
273+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.Build.0 = Release|Any CPU
274+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.ActiveCfg = Release|Any CPU
275+
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.Build.0 = Release|Any CPU
276+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
277+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
278+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.ActiveCfg = Debug|Any CPU
279+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.Build.0 = Debug|Any CPU
280+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.ActiveCfg = Debug|Any CPU
281+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.Build.0 = Debug|Any CPU
282+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
283+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.Build.0 = Release|Any CPU
284+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.ActiveCfg = Release|Any CPU
285+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.Build.0 = Release|Any CPU
286+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.ActiveCfg = Release|Any CPU
287+
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.Build.0 = Release|Any CPU
262288
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
263289
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.Build.0 = Debug|Any CPU
264290
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -304,6 +330,11 @@ Global
304330
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
305331
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
306332
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
333+
{6768EA38-1335-4B8E-BC09-CCDED1F9AAF6} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
334+
{8FB23F61-77CB-42C7-8EEC-B22D7C4E4067} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
335+
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
336+
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
337+
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
307338
{A47968E2-CDD1-4BCF-9093-D0C5225A815B} = {3D948D55-3CD2-496D-A04C-3B4E7BB69140}
308339
{9D5C46E8-0C07-4384-8E58-903F7C2C7171} = {A47968E2-CDD1-4BCF-9093-D0C5225A815B}
309340
{600D4BE2-FCE0-4684-AC6F-2DC829B395BA} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}

Packages.props

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4+
<SystemVersion>7.0.*</SystemVersion>
45
<MicrosoftExtensionsVersion>7.0.*</MicrosoftExtensionsVersion>
56
<AspNetCoreVersion>7.0.*</AspNetCoreVersion>
7+
<FsToolkitVersion>4.9.*</FsToolkitVersion>
68
<XUnitVersion>2.5.0</XUnitVersion>
79
<FAKEVersion>6.*</FAKEVersion>
810
</PropertyGroup>
911
<ItemGroup Label="Common">
1012
<PackageReference Update="FParsec" Version="1.1.1" />
11-
<!--<PackageReference Update="FSharp.Core" Version="4.7.2">-->
1213
<PackageReference Include="FSharp.Core" Version="$(FSharpCoreVersion)">
1314
<ExcludeAssets>contentFiles</ExcludeAssets>
1415
</PackageReference>
16+
<PackageReference Update="FSharp.Control.FusionTasks" Version="2.6.*" />
17+
<PackageReference Update="FSharp.Control.Reactive" Version="5.0.*" />
18+
<PackageReference Update="FSharp.SystemTextJson" Version="1.*" />
19+
<PackageReference Update="FsToolkit.ErrorHandling" Version="$(FsToolkitVersion)" />
20+
<PackageReference Update="FsToolkit.ErrorHandling.TaskResult" Version="$(FsToolkitVersion)" />
1521
<PackageReference Update="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsVersion)" />
22+
<PackageReference Update="Microsoft.NETCore.Platforms" Version="$(SystemVersion)" />
1623
<PackageReference Update="NuGet.CommandLine" Version="1.*" />
17-
<PackageReference Update="System.CodeDom" Version="6.*" />
24+
<PackageReference Update="System.CodeDom" Version="$(SystemVersion)" />
25+
<PackageReference Update="System.Collections.Immutable" Version="$(SystemVersion)" />
26+
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="$(SystemVersion)" />
1827
<PackageReference Update="System.Management" Version="6.*" />
19-
<PackageReference Update="System.Reactive" Version="6.*" />
28+
<PackageReference Update="System.Reactive" Version="6.*" NoWarn="NU1608" />
29+
<PackageReference Update="System.Text.Json" Version="$(SystemVersion)" />
2030
</ItemGroup>
2131
<ItemGroup Label="Build">
2232
<PackageReference Update="BlackFox.VsWhere" Version="1.1.0" />

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ let PersonType = Define.Object(
3131
name = "Person",
3232
fields = [
3333
// Property resolver will be auto-generated
34-
Define.AutoField("firstName", String)
34+
Define.AutoField("firstName", StringType)
3535
// Asynchronous explicit member resolver
36-
Define.AsyncField("lastName", String, resolve = fun context person -> async { return person.LastName })
36+
Define.AsyncField("lastName", StringType, resolve = fun context person -> async { return person.LastName })
3737
])
3838
3939
// Include person as a root query of a schema
@@ -91,12 +91,12 @@ let customStreamDirective =
9191
let args = [|
9292
Define.Input(
9393
"interval",
94-
Nullable Int,
94+
Nullable IntType,
9595
defaultValue = Some 2000,
9696
description = "An optional argument used to buffer stream results. ")
9797
Define.Input(
9898
"preferredBatchSize",
99-
Nullable Int,
99+
Nullable IntType,
100100
defaultValue = None,
101101
description = "An optional argument used to buffer stream results. ") |]
102102
{ StreamDirective with Args = args }
@@ -424,7 +424,7 @@ As field definitions are immutable by default, generating copies of them with im
424424

425425
```fsharp
426426
let field : FieldDef<'Val> = // Search for field inside ISchema
427-
let arg : Define.Input("id", String)
427+
let arg : Define.Input("id", StringType)
428428
let fieldWithArg = field.WithArgs([ arg ])
429429
```
430430

0 commit comments

Comments
 (0)