Skip to content

Commit f58b1bf

Browse files
Copilotxperiandri
andauthored
Use initializer-style extensions in integration error resolver
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/d64ab4ee-eb67-4b7c-a114-d6ad4b640254 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent 1e567ad commit f58b1bf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • tests/FSharp.Data.GraphQL.IntegrationTests.Server

tests/FSharp.Data.GraphQL.IntegrationTests.Server/Schema.fs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ module Schema =
144144
args = [],
145145
resolve =
146146
fun _ _ ->
147-
let extensions = Dictionary<string, obj> 2
148-
extensions["code"] <- box "OPERATION_ERROR_TEST"
149-
extensions["severity"] <- box 7
147+
let extensions =
148+
Dictionary<string, obj>(
149+
[ KeyValuePair("code", box "OPERATION_ERROR_TEST")
150+
KeyValuePair("severity", box 7) ]
151+
)
150152
raise (GQLMessageException("Always fails for tests", extensions))
151153
) ])
152154

0 commit comments

Comments
 (0)