-
-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Labels
serverIssue related to caliban serverIssue related to caliban serverspecIssue related to the graphql specIssue related to the graphql spec
Description
This seems like a missing feature in caliban.
caliban/core/src/main/scala/caliban/schema/Types.scala
Lines 120 to 137 in 26fd650
| def makeInterface( | |
| name: Option[String], | |
| description: Option[String], | |
| fields: () => List[__Field], | |
| subTypes: List[__Type], | |
| origin: Option[String] = None, | |
| directives: Option[List[Directive]] = None | |
| ): __Type = | |
| __Type( | |
| __TypeKind.INTERFACE, | |
| name, | |
| description, | |
| fields = | |
| args => if (args.includeDeprecated.getOrElse(false)) Some(fields()) else Some(fields().filter(!_.isDeprecated)), | |
| possibleTypes = Some(subTypes), | |
| origin = origin, | |
| directives = directives | |
| ) |
This is supported for types and objects but not interfaces
caliban/core/src/main/scala/caliban/schema/Types.scala
Lines 45 to 62 in 26fd650
| def makeObject( | |
| name: Option[String], | |
| description: Option[String], | |
| fields: List[__Field], | |
| directives: List[Directive], | |
| origin: Option[String] = None, | |
| interfaces: () => Option[List[__Type]] = () => Some(Nil) | |
| ): __Type = | |
| __Type( | |
| __TypeKind.OBJECT, | |
| name, | |
| description, | |
| fields = | |
| args => if (args.includeDeprecated.getOrElse(false)) Some(fields) else Some(fields.filter(!_.isDeprecated)), | |
| interfaces = interfaces, | |
| directives = Some(directives), | |
| origin = origin | |
| ) |
The specification allows this: https://spec.graphql.org/draft/#sec-Interfaces
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
serverIssue related to caliban serverIssue related to caliban serverspecIssue related to the graphql specIssue related to the graphql spec