Skip to content

Commit 01c75cb

Browse files
committed
Fixed comments
1 parent 51b7def commit 01c75cb

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/FSharp.Data.GraphQL.Server/Executor.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
100100
match Validation.Types.validateTypeMap schema.TypeMap with
101101
| Success -> ()
102102
| ValidationError errors -> raise (GQLMessageException (System.String.Join("\n", errors)))
103-
103+
104104
// Compute schema ID once after middleware has run and cache it for the lifetime of this Executor instance
105105
let schemaId = schema.Introspected.GetHashCode()
106106

@@ -189,7 +189,7 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
189189
/// Asynchronously executes a provided execution plan. In case of repetitive queries, execution plan may be preprocessed
190190
/// and cached using `documentId` as an identifier.
191191
/// Returned value is a readonly dictionary consisting of following top level entries:
192-
/// 'documentId' (unique identifier of current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
192+
/// 'documentId' (unique identifier of the current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
193193
/// 'data' (GraphQL response matching the structure provided in GraphQL query string), and
194194
/// 'errors' (optional, contains a list of errors that occurred while executing a GraphQL operation).
195195
/// </summary>
@@ -202,7 +202,7 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
202202

203203
/// <summary>
204204
/// Asynchronously executes parsed GraphQL query AST. Returned value is a readonly dictionary consisting of following top level entries:
205-
/// 'documentId' (unique identifier of current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
205+
/// 'documentId' (unique identifier of the current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
206206
/// 'data' (GraphQL response matching the structure provided in GraphQL query string), and
207207
/// 'errors' (optional, contains a list of errors that occurred while executing a GraphQL operation).
208208
/// </summary>
@@ -220,7 +220,7 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
220220

221221
/// <summary>
222222
/// Asynchronously executes unparsed GraphQL query AST. Returned value is a readonly dictionary consisting of following top level entries:
223-
/// 'documentId' (unique identifier of current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
223+
/// 'documentId' (unique identifier of the current document's AST, it can be used as a key/identifier of ExecutionPlan as well),
224224
/// 'data' (GraphQL response matching the structure provided in GraphQL query string), and
225225
/// 'errors' (optional, contains a list of errors that occurred while executing a GraphQL operation).
226226
/// </summary>

src/FSharp.Data.GraphQL.Shared/AstExtensions.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ type Document with
108108
member x.ToQueryString ([<Optional; DefaultParameterValue(QueryStringPrintingOptions.None)>] options : QueryStringPrintingOptions) =
109109
let sb = PaddedStringBuilder ()
110110
let escapeGraphQLString (s : string) =
111-
let escaped = StringBuilder (s.Length + 2)
111+
let escaped = StringBuilder (s.Length + s.Length / 4 + 2)
112112
escaped.Append ('"') |> ignore
113113
for c in s do
114114
let appendStr =
@@ -328,7 +328,7 @@ type Document with
328328
| None -> failwithf "Can not get information about fragment \"%s\". Fragment spread definition was not found in the query." name
329329
let operations =
330330
this.Definitions
331-
|> List.choose (function
331+
|> List_choose (function
332332
| FragmentDefinition _ -> None
333333
| OperationDefinition def -> Some def)
334334
|> List.map (fun operation -> operation.Name, operation)

src/FSharp.Data.GraphQL.Shared/TypeSystem.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ and PlanningContext = {
671671
RootDef : ObjectDef
672672
Document : Document
673673
Operation : OperationDefinition
674+
/// Unique identifier of the current document's AST.
674675
DocumentId : string
675676
Metadata : Metadata
676677
}
@@ -887,7 +888,7 @@ and SchemaCompileContext = {
887888
/// A planning of an execution phase.
888889
/// It is used by the execution process to execute an operation.
889890
and ExecutionPlan = {
890-
/// Unique identifier of the current execution plan.
891+
/// Unique identifier of the current document's AST.
891892
DocumentId : string
892893
/// AST definition of current operation.
893894
Operation : OperationDefinition

0 commit comments

Comments
 (0)