Skip to content

Commit cc87ba3

Browse files
authored
[docs] update interfaces documentation (#741)
We currently support interfaces implementing other interfaces so removing old docs.
1 parent d1b25f2 commit cc87ba3

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

docs/writing-schemas/interfaces.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -90,42 +90,3 @@ sealed class Pet(val name: String) {
9090
class Cat(name: String, val livesRemaining: Int) : Pet(name)
9191
}
9292
```
93-
94-
### Known Issues
95-
> We currently do not support multiple levels of interfaces in a schema. We are waiting until graphql-java supports the newly added feature to the GraphQL spec. [See 589](https://github.com/ExpediaGroup/graphql-kotlin/issues/589). If you do have multiple interfaces you will have to either combine them into a single interface or ignore all the parent interfaces by marking them private or using `@GraphQLIgnore`.
96-
97-
#### Invalid Schema
98-
```kotlin
99-
interface FirstLevel {
100-
val id: String
101-
}
102-
103-
interface SecondLevel : FirstLevel {
104-
val name: String
105-
}
106-
107-
class MyClass(override val id: String, override val name: String) : SecondLevel
108-
```
109-
110-
#### Valid Schema
111-
```kotlin
112-
@GraphQLIgnore
113-
interface FirstLevel {
114-
val id: String
115-
}
116-
117-
interface SecondLevel : FirstLevel {
118-
val name: String
119-
}
120-
121-
class MyClass(override val id: String, override val name: String) : SecondLevel
122-
```
123-
OR
124-
```kotlin
125-
interface FirstLevel {
126-
val id: String
127-
val name: String
128-
}
129-
130-
class MyClass(override val id: String, override val name: String) : FirstLevel
131-
```

0 commit comments

Comments
 (0)