Clarify object type documentation

Craig pointed out this is a bit confusing when you don't have all the
fields.  Now we say so, but still include the type's description in case
it's useful.

Fixes #37.
This commit is contained in:
Ben Kraft
2021-04-23 18:13:32 -07:00
parent f1914cd9ef
commit d449acdda3
22 changed files with 129 additions and 1 deletions
+6
View File
@@ -6,6 +6,9 @@ import (
"github.com/Khan/genqlient/graphql"
)
// QueryWithEnumsOtherUser includes the requested fields of the GraphQL type User.
// The GraphQL type's documentation follows.
//
// A User is a user!
type QueryWithEnumsOtherUser struct {
Roles []Role `json:"roles"`
@@ -25,6 +28,9 @@ type QueryWithEnumsResponse struct {
OtherUser QueryWithEnumsOtherUser `json:"otherUser"`
}
// QueryWithEnumsUser includes the requested fields of the GraphQL type User.
// The GraphQL type's documentation follows.
//
// A User is a user!
type QueryWithEnumsUser struct {
Roles []Role `json:"roles"`