File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -1450,12 +1450,20 @@ inline fragments (with the exception of the meta-field {\_\_typename}).
1450
1450
For example , we might define the following types :
1451
1451
1452
1452
```graphql example
1453
- union SearchResult = Photo | Person
1453
+ interface Link {
1454
+ link : Downloadable
1455
+ }
1454
1456
1455
- interface Downloadable = {
1456
- url : String
1457
+ type SearchResultLink implements Link {
1458
+ link : DownloadableSearchResult
1459
+ }
1460
+
1461
+ interface Downloadable {
1462
+ url : string
1457
1463
}
1458
1464
1465
+ union SearchResult = Photo | Person
1466
+
1459
1467
intersection DownloadableSearchResult = SearchResult & Downloadable
1460
1468
1461
1469
type Person implements Downloadable {
@@ -1475,6 +1483,11 @@ type SearchQuery {
1475
1483
}
1476
1484
```
1477
1485
1486
+ Because intersection `DownloadableSearchResult ` includes interface
1487
+ `Downloadable ` as a constraining member type , the possible types of the
1488
+ intersection implement the `Downloadable ` interface . The `link ` field within
1489
+ `SearchResultLink ` therefore implements the `link ` field of interface `Link `.
1490
+
1478
1491
Just as with unions , the below could be ambiguous and is invalid .
1479
1492
1480
1493
```graphql counter -example
You can’t perform that action at this time.
0 commit comments