by theswan · 8y ago · 0 comments
Our docs are a bit spare at the moment, but this means with code like:
type User struct {
Id int64
Name string
}
func rootUser(ctx context.Context, args struct { id int64 }) (*User, error) {
// ...
}
schemaRoot.FieldFunc("user", rootUser);
We can derive the graphql SDL types automatically (looking at the arguments and return values) and use them with other graphql tooling, but it saves folks time from writing out a separate schema and keeping it in sync.No comments yet.