Skip to content

Commit

Permalink
introspection: inputFields
Browse files Browse the repository at this point in the history
  • Loading branch information
neelance committed Oct 21, 2016
1 parent c4faac5 commit 9333c0b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/exec/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,16 @@ func (r *typeResolver) EnumValues(args struct{ IncludeDeprecated bool }) *[]*enu
}

func (r *typeResolver) InputFields() *[]*inputValueResolver {
panic("TODO")
t, ok := r.typ.(*schema.InputObject)
if !ok {
return nil
}

l := make([]*inputValueResolver, len(t.InputFieldOrder))
for i, name := range t.InputFieldOrder {
l[i] = &inputValueResolver{t.InputFields[name]}
}
return &l
}

func (r *typeResolver) OfType() *typeResolver {
Expand Down

0 comments on commit 9333c0b

Please sign in to comment.