When using aliases in graphql what is the proper way to tell typescript that alias exists?
query GetAssets {
red: assets(type: "red") {
uuid
name
}
blue: assets(type: "blue") {
uuid
name
}
}
But the generated types file only includes:
export type Query = {
assets?: Maybe<AssetData>
}
I'd like to access data.red
, but only data.assets
is a known type.
question from:
https://stackoverflow.com/questions/65921676/graphql-aliases-with-typescript 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…