Skip to content

Commit 99e18f7

Browse files
Updated introspection_query.graphql reference in ReadMe (#527)
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 62aed42 commit 99e18f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Our client library now has a completely redesigned type provider. To start using
175175
type MyProvider = GraphQLProvider<"http://some.graphqlserver.development.org">
176176
```
177177

178-
2. Provide an introspection json file to be used by the provider. Beware though that the introspection json should have all fields required by the provider. You can get the correct fields by running [our standard introspection query](docs/files/introspection_query.graphql) on the desired server and saving it into a file on the same path as the project using the provider:
178+
2. Provide an introspection json file to be used by the provider. Beware though that the introspection json should have all fields required by the provider. You can get the correct fields by running [our standard introspection query](docs/introspection_query.graphql) on the desired server and saving it into a file on the same path as the project using the provider:
179179

180180
```fsharp
181181
type MyProvider = GraphQLProvider<"swapi_schema.json">
@@ -260,7 +260,7 @@ let internal executeOperation (ctx : ExecutionContext) : AsyncVal<GQLResponse> =
260260
// ...
261261
```
262262

263-
That way, in the compile schema phase, the schema is modified and execution maps are generated inside the `SchemaCompileContext` object. During the operation planning phase, values of the `PlanningContext` object are used to generate an execution plan, and finally, this plan is passed alongside other values in the `ExecutionContext` object to the operation execution phase, wich finally uses them to execute the query and generate a `GQLResponse`.
263+
That way, in the compile schema phase, the schema is modified and execution maps are generated inside the `SchemaCompileContext` object. During the operation planning phase, values of the `PlanningContext` object are used to generate an execution plan, and finally, this plan is passed alongside other values in the `ExecutionContext` object to the operation execution phase, which finally uses them to execute the query and generate a `GQLResponse`.
264264

265265
With that being said, a middleware can be used to intercept each phase and customize them as necessary. Each middleware must be implemented as a function with a specific signature, and wrapped inside an `IExecutorMiddleware` interface:
266266

@@ -290,7 +290,7 @@ type ExecutorMiddleware(?compile, ?plan, ?execute) =
290290
member _.ExecuteOperationAsync = execute
291291
```
292292

293-
Each of the middleware functions act like an intercept function, with two parameters: the context of the phase, the function of the next middleware (or the actual phase itself, wich is the last to run), and the return value. Those functions can be passed as an argument to the constructor of the `Executor<'Root>` object:
293+
Each of the middleware functions act like an intercept function, with two parameters: the context of the phase, the function of the next middleware (or the actual phase itself, which is the last to run), and the return value. Those functions can be passed as an argument to the constructor of the `Executor<'Root>` object:
294294

295295
```fsharp
296296
let middleware = [ ExecutorMiddleware(compileFn, planningFn, executionFn) ]
@@ -315,7 +315,7 @@ There are some built-in middleware inside `FSharp.Data.GraphQL.Server.Middleware
315315

316316
#### QueryWeightMiddleware
317317

318-
This middleware can be used to place weights on fields of the schema. Those weightened fields can now be used to protect the server from complex queries that could otherwise be used in DDOS attacks.
318+
This middleware can be used to place weights on fields of the schema. Those weighted fields can now be used to protect the server from complex queries that could otherwise be used in DDOS attacks.
319319

320320
When defining a field, we use the extension method `WithQueryWeight` to place a weight on it:
321321

0 commit comments

Comments
 (0)