more TODOs around type naming

This commit is contained in:
Ben Kraft
2021-03-30 17:56:14 -07:00
parent 27ee3c2dbd
commit fb3c0b3cb4
+3 -1
View File
@@ -86,6 +86,9 @@ func (g *generator) addTypeForDefinition(namePrefix, nameOverride string, typ *a
// prefix for the next type.
namePrefix = name
}
// TODO: for input and enum types, we can probably skip the prefix
// entirely; they don't have fields that may be used in some places but
// not others.
}
@@ -201,7 +204,6 @@ func (builder *typeBuilder) writeField(field field) error {
// `query q { a: f { b }, c: f { d } }` we need separate types for a
// and c, even though they are the same type in GraphQL, because they
// have different fields.
// TODO: if this is an input type, we should skip the prefixing!
builder.typeNamePrefix+upperFirst(field.Alias()), "", typ, fields)
if err != nil {
return err