Skip to content

Commit deb499b

Browse files
authored
Reverted documentation changes in #8267 (#8323)
1 parent 9af876c commit deb499b

File tree

15 files changed

+27
-27
lines changed

15 files changed

+27
-27
lines changed

website/src/blog/2019-02-20-schema-stitching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ Query delegation rewriters are registered with the dependency injection and not
653653
services.AddQueryDelegationRewriter<AddCreatedByIdQueryRewriter>();
654654
```
655655

656-
> Query delegation rewriters are hosted as scoped services and can be injected with `IStitchingContext` and `Schema` in order to access the remote schemas or the stitched schema for advanced type information.
656+
> Query delegation rewriters are hosted as scoped services and can be injected with `IStitchingContext` and `ISchema` in order to access the remote schemas or the stitched schema for advanced type information.
657657
658658
With that in place, the stitching engine will always fetch the requested field for us whenever a `Message` object is requested.
659659

website/src/blog/2019-04-11-integration-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class Query
3535
In order to create a schema from that simple type we could just do the following:
3636

3737
```csharp
38-
Schema schema = Schema.Create(c => c.RegisterQueryType<Query>());
38+
ISchema schema = Schema.Create(c => c.RegisterQueryType<Query>());
3939
```
4040

4141
OK, now we have a schema against which we can write our tests.
@@ -205,7 +205,7 @@ Our test could look like the following:
205205
public async Task Ensure_Schema_IsCorrect()
206206
{
207207
// arrange
208-
Schema schema = Schema.Create(c =>
208+
ISchema schema = Schema.Create(c =>
209209
{
210210
c.RegisterQueryType<Query>();
211211
});
@@ -234,7 +234,7 @@ public async Task SayHello_HelloIsReturned()
234234
.AddSingleton<IDataLayer, MyDataLayer>()
235235
.BuildServiceProvider();
236236

237-
Schema schema = Schema.Create(c =>
237+
ISchema schema = Schema.Create(c =>
238238
{
239239
c.RegisterQueryType<Query>();
240240
});

website/src/blog/2019-04-12-type-system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We started with version 9.0.0-preview.9 to deliver more and more parts of the ne
1919
The most prominent API that we are introducing is the new `SchemaBuilder`. The `SchemaBuilder` provides us with a new way to define schemas. Do not worry the current `ISchemaConfiguration` API is still supported and will not go away. In fact, `ISchemaConfiguration` now is just an interface over `SchemaBuilder` and we will evolve both APIs over time so that you can pick the one that you like more.
2020

2121
```csharp
22-
Schema schema = SchemaBuilder.New()
22+
ISchema schema = SchemaBuilder.New()
2323
.AddQueryType<FooType>()
2424
.Create();
2525
```
@@ -31,7 +31,7 @@ First, we wanted the builder API to be decoupled from the actual schema, we want
3131
With the schema builder we are now more flexible in scenarios like schema stitching.
3232

3333
```csharp
34-
Schema schema = SchemaBuilder.New()
34+
ISchema schema = SchemaBuilder.New()
3535
.AddQueryType<FooType>()
3636
.AddDirectiveType<BarType>()
3737
.AddSchemaFromFile("./Schema.graphql")
@@ -386,7 +386,7 @@ Also, you can define multiple type extensions for a single type.
386386
So, let us have a look of how we add type extensions to our schema:
387387

388388
```csharp
389-
Schema schema = SchemaBuilder.New()
389+
ISchema schema = SchemaBuilder.New()
390390
.AddQueryType<FooType>()
391391
.AddType<FooTypeExtension>();
392392
.Create()

website/src/docs/hotchocolate/v10/execution-engine/validation-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The rule interface itself is simple, basically the validation middleware will ca
1212
```csharp
1313
public interface IQueryValidationRule
1414
{
15-
QueryValidationResult Validate(Schema schema, DocumentNode query);
15+
QueryValidationResult Validate(ISchema schema, DocumentNode query);
1616
}
1717
```
1818

website/src/docs/hotchocolate/v10/schema/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There are basically two ways to define a schema, with code or with the GraphQL S
1313
In schema-first we could create a simple hello world schema like the following:
1414

1515
```csharp
16-
Schema schema = SchemaBuilder.New()
16+
ISchema schema = SchemaBuilder.New()
1717
.AddDocumentFromString("type Query { hello: String }")
1818
.AddResolver("Query", "hello", "World")
1919
.Create();
@@ -29,7 +29,7 @@ public class Query
2929
public string Hello() => "World";
3030
}
3131

32-
Schema schema = SchemaBuilder.New()
32+
ISchema schema = SchemaBuilder.New()
3333
.AddQueryType<Query>()
3434
.Create();
3535
```
@@ -50,7 +50,7 @@ public class QueryType
5050
}
5151
}
5252

53-
Schema schema = SchemaBuilder.New()
53+
ISchema schema = SchemaBuilder.New()
5454
.AddQueryType<QueryType>()
5555
.Create();
5656
```
@@ -72,7 +72,7 @@ public class Query
7272
public string Hello() => "World";
7373
}
7474

75-
Schema schema = SchemaBuilder.New()
75+
ISchema schema = SchemaBuilder.New()
7676
.AddQueryType<QueryType>()
7777
.Create();
7878
```
@@ -102,7 +102,7 @@ public class QueryTypeExtension
102102
}
103103
}
104104

105-
Schema schema = SchemaBuilder.New()
105+
ISchema schema = SchemaBuilder.New()
106106
.AddDocumentFromString("type Query { hello: String }")
107107
.AddResolver("Query", "hello", "World")
108108
.AddType<QueryTypeExtension>()
@@ -127,7 +127,7 @@ Types in a schema can be bound to a specific .NET type. When the schema builder
127127
We can also bind additional types to a single schema type. For instance we can bind the `System.Guid` to our `StringType`.
128128

129129
```csharp
130-
Schema schema = SchemaBuilder.New()
130+
ISchema schema = SchemaBuilder.New()
131131
...
132132
.BindClrType<Guid, StringType>()
133133
.Create();
@@ -136,7 +136,7 @@ Schema schema = SchemaBuilder.New()
136136
You can also rebind scalars with this, so instead of the default `int` to `IntType` binding we could bind that as well to our `StringType`.
137137

138138
```csharp
139-
Schema schema = SchemaBuilder.New()
139+
ISchema schema = SchemaBuilder.New()
140140
...
141141
.BindClrType<int, StringType>()
142142
.Create();
@@ -156,7 +156,7 @@ public class MySchema
156156
}
157157
}
158158

159-
Schema schema = SchemaBuilder.New()
159+
ISchema schema = SchemaBuilder.New()
160160
.AddDocumentFromString("type Query { hello: String }")
161161
.AddResolver("Query", "hello", "World")
162162
.SetSchema<MySchema>()

website/src/docs/hotchocolate/v10/schema/relay.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This allows now the client APIs to automatically refetch objects from the server
3737
Hot Chocolate makes implementing this very easy. First, we have to declare on our schema that we want to be relay compliant:
3838

3939
```csharp
40-
Schema schema = SchemaBuilder.New()
40+
ISchema schema = SchemaBuilder.New()
4141
.EnableRelaySupport()
4242
...
4343
.Create();

website/src/docs/hotchocolate/v10/schema/resolvers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ The following resolver context properties can be injected without any attributes
213213

214214
| Member | Type | Description |
215215
| -------------------------- | ------------------------- | ----------------------------------------------------------------- |
216-
| `Schema` | `Schema` | The GraphQL schema. |
216+
| `Schema` | `ISchema` | The GraphQL schema. |
217217
| `ObjectType` | `ObjectType` | The object type on which the field resolver is being executed. |
218218
| `Field` | `ObjectField` | The field on which the field resolver is being executed. |
219219
| `QueryDocument` | `DocumentNode` | The query that is being executed. |
@@ -273,7 +273,7 @@ public Person GetFriend([State("foo")]Bar bar)
273273

274274
| Member | Type | Description |
275275
| --------------------------- | ------------------------- | ------------------------------------------------------------------------------------- |
276-
| `Schema` | `Schema` | The GraphQL schema. |
276+
| `Schema` | `ISchema` | The GraphQL schema. |
277277
| `ObjectType` | `ObjectType` | The object type on which the field resolver is being executed. |
278278
| `Field` | `ObjectField` | The field on which the field resolver is being executed. |
279279
| `QueryDocument` | `DocumentNode` | The query that is being executed. |

website/src/docs/hotchocolate/v10/server/dependency-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You are also able to inject parts from your field resolver context like the sche
2121
```csharp
2222
public class Query
2323
{
24-
public string Bar(Schema schema, [Service]MyCustomService service)
24+
public string Bar(ISchema schema, [Service]MyCustomService service)
2525
{
2626
return "foo";
2727
}

website/src/docs/hotchocolate/v10/stitching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ Query delegation rewriters are registered with the dependency injection and not
646646
services.AddQueryDelegationRewriter<AddCreatedByIdQueryRewriter>();
647647
```
648648

649-
> Query delegation rewriters are hosted as scoped services and can be injected with `IStitchingContext` and `Schema` in order to access the remote schemas or the stitched schema for advanced type information.
649+
> Query delegation rewriters are hosted as scoped services and can be injected with `IStitchingContext` and `ISchema` in order to access the remote schemas or the stitched schema for advanced type information.
650650
651651
With that in place, the stitching engine will always fetch the requested field for us whenever a `Message` object is requested.
652652

website/src/docs/hotchocolate/v11/api-reference/migrate-from-10-to-11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ We have added a couple of test helpers to make the transition to the new configu
718718
**New:**
719719

720720
```csharp
721-
Schema schema =
721+
ISchema schema =
722722
await new ServiceCollection()
723723
.AddGraphQL()
724724
.AddQueryType<Query>()

0 commit comments

Comments
 (0)