Skip to content

Commit 828ecd0

Browse files
committed
removes extend from type definitions in Source Schema and Field Selection`
1 parent c09dab7 commit 828ecd0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

spec/Appendix A -- Field Selection.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ considered valid. For non-scalar arguments, you must specify each field of the
5252
input type in {SelectedObjectValue}.
5353

5454
```graphql example
55-
extend type Query {
55+
type Query {
5656
findUserByName(user: UserInput! @is(field: "{ firstName: firstName }")): User
5757
@lookup
5858
}
5959
```
6060

6161
```graphql counter-example
62-
extend type Query {
62+
type Query {
6363
findUserByName(user: UserInput! @is(field: "firstName")): User @lookup
6464
}
6565
```
@@ -846,7 +846,7 @@ In contrast, the following is invalid because it uses a field "address" which is
846846
not defined on the expected type:
847847

848848
```graphql counter-example
849-
extend type Query {
849+
type Query {
850850
storeById(id: ID! @is(field: "address")): Store! @lookup
851851
}
852852

@@ -875,7 +875,7 @@ would create ambiguity and potential conflicts.
875875
For example, the following is invalid:
876876

877877
```graphql counter-example
878-
extend type Query {
878+
type Query {
879879
storeById(id: ID! @is(field: "id id")): Store! @lookup
880880
}
881881

@@ -919,7 +919,7 @@ input UserInput {
919919
Then, an invalid selection would be missing the required `id` field:
920920

921921
```graphql counter-example
922-
extend type Query {
922+
type Query {
923923
userById(user: UserInput! @is(field: "{ name: name }")): User! @lookup
924924
}
925925
```
@@ -928,7 +928,7 @@ If the `UserInput` type requires the `name` field, but the `User` type has an
928928
optional `name` field, the following selection would be valid.
929929

930930
```graphql example
931-
extend type Query {
931+
type Query {
932932
findUser(input: UserInput! @is(field: "{ name: name }")): User! @lookup
933933
}
934934

@@ -947,7 +947,7 @@ But if the `UserInput` type requires the `name` field but it's not defined in
947947
the `User` type, the selection would be invalid.
948948

949949
```graphql counter-example
950-
extend type Query {
950+
type Query {
951951
findUser(input: UserInput! @is(field: "{ id: id }")): User! @lookup
952952
}
953953

spec/Section 2 -- Source Schema.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,23 @@ Note: In this case the `@is` directive could also be omitted as the argument and
360360
field names match.
361361

362362
```graphql example
363-
extend type Query {
363+
type Query {
364364
personById(id: ID! @is(field: "id")): Person @lookup
365365
}
366366
```
367367

368368
The `@is` directive also allows referring to nested fields relative to `Person`.
369369

370370
```graphql example
371-
extend type Query {
371+
type Query {
372372
personByAddressId(id: ID! @is(field: "address.id")): Person
373373
}
374374
```
375375

376376
The `@is` directive is not limited to a single argument.
377377

378378
```graphql example
379-
extend type Query {
379+
type Query {
380380
personByAddressId(
381381
id: ID! @is(field: "address.id")
382382
kind: PersonKind @is(field: "kind")
@@ -388,7 +388,7 @@ The `@is` directive can also be used in combination with `@oneOf` to specify
388388
lookup fields that can resolve entities by different keys.
389389

390390
```graphql example
391-
extend type Query {
391+
type Query {
392392
person(
393393
by: PersonByInput
394394
@is(field: "{ id } | { addressId: address.id } | { name }")
@@ -781,7 +781,7 @@ type Review {
781781
author: User @provides(fields: "email")
782782
}
783783

784-
extend type User {
784+
type User {
785785
id: ID!
786786
email: String! @external
787787
}
@@ -819,7 +819,7 @@ type Product @key(fields: "id") {
819819
}
820820

821821
# The new "Payments" schema:
822-
extend type Product @key(fields: "id") {
822+
type Product @key(fields: "id") {
823823
id: ID! @external
824824
price: Float! @override(from: "Catalog")
825825
tax: Float!
@@ -837,14 +837,14 @@ type Product @key(fields: "id") {
837837
}
838838

839839
# The new "Payments" schema:
840-
extend type Product @key(fields: "id") {
840+
type Product @key(fields: "id") {
841841
id: ID! @external
842842
price: Float! @override(from: "Catalog")
843843
tax: Float!
844844
}
845845

846846
# The new "Pricing" schema:
847-
extend type Product @key(fields: "id") {
847+
type Product @key(fields: "id") {
848848
id: ID! @external
849849
price: Float! @override(from: "Payments")
850850
tax: Float!
@@ -862,7 +862,7 @@ type Product @key(fields: "id") {
862862
}
863863

864864
# The new "Payments" schema:
865-
extend type Product @key(fields: "id") {
865+
type Product @key(fields: "id") {
866866
id: ID! @external
867867
price: Float! @override(from: "Catalog")
868868
tax: Float!

0 commit comments

Comments
 (0)