thunder
thunder copied to clipboard
Base struct fields are not recognized
I'm using a base struct for some common fields in my model, for example, an ID field. It seems when using a struct that has the base struct, those fields are not recognized by the library.
For example, this will not work:
type Base struct {
ID string
}
type User struct {
Base
Email string
}
The query here fails with unknown field "id"
query {
users {
id
}
}
I dug into the code a bit. Since the base/embedded struct is just another field, it probably needs to be handled here.
The field Anonymous
on reflect.StructField
could possibly be used to determine whether or not to recursively look for additional base struct fields.
Has any progress been made as this would be usefull for my project?