You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query Details($id: ID!) {
viewer {
Model(id: $clipId) {
id
...BasicInfo
recommendations {
edges {
node {
id
... on ModelInterface {
...BasicInfo
}
}
}
}
}
}
}
fragment BasicInfo on ModelInterface {
title
}
we get the following code generation:
public struct Recommendation: GraphQLMappable {
public let __typename = "XXXConnection"
public let edges: [Edge?]?
public init(reader: GraphQLResultReader) throws {
edges = try reader.optionalList(for: Field(responseName: "edges"))
}
public struct Edge: GraphQLMappable {
public let __typename = "XXXEdge"
public let node: Node?
public init(reader: GraphQLResultReader) throws {
node = try reader.optionalValue(for: Field(responseName: "node"))
}
public struct Node: GraphQLMappable {
public let __typename: String
public let id: GraphQLID
public init(reader: GraphQLResultReader) throws {
__typename = try reader.value(for: Field(responseName: "__typename"))
id = try reader.value(for: Field(responseName: "id"))
}
}
}
}
The type constraint for the conditional fragment to be a ModelInterface is redundant but the fragment should still be included in the generated code.
The text was updated successfully, but these errors were encountered:
In the following example:
we get the following code generation:
The type constraint for the conditional fragment to be a
ModelInterface
is redundant but the fragment should still be included in the generated code.The text was updated successfully, but these errors were encountered: