Fix missing docs for enum variants generated for dispatching GraphQL interface values

This commit is contained in:
tyranron 2020-11-09 13:40:24 +01:00
parent a4871887bb
commit 4dbd740fef
No known key found for this signature in database
GPG key ID: 762E144FB230A4F0

View file

@ -1730,8 +1730,15 @@ impl EnumType {
let variants = self.variants.iter().enumerate().map(|(n, ty)| {
let variant = Self::variant_ident(n);
let doc = format!(
"`{}` implementer of this GraphQL interface.",
quote! { #ty },
);
quote! { #variant(#ty), }
quote! {
#[doc = #doc]
#variant(#ty),
}
});
let phantom_variant = if self.has_phantom_variant() {