Khan/genqlient

Hide __typename field if not user requested

Open

#61 创建于 2021年8月24日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)Go (141 fork)github user discovery
enhancementhelp wanted

仓库指标

Star
 (1,310 star)
PR 合并指标
 (PR 指标待抓取)

描述

If you request some field of interface type, we automatically add __typename to your selection, so we can use the right type. But you probably don't need that field in your structs; you can always switch on the Go type! So ideally we should omit it from the generated structs. This isn't hard in principle, it's just some awkward plumbing since the place where we need to add it and the place where we need to ignore it are not very close together.

贡献者指南