Function
getField
(t: GQLType, name: string)
Source from the content-addressed store, hash-verified
| 49 | } |
| 50 | |
| 51 | function getField(t: GQLType, name: string): Field { |
| 52 | if (!t.fields) return panic(`Required field ${name} in type ${t.name} which doesn't have fields.`); |
| 53 | for (const f of t.fields) { |
| 54 | if (f.name === name) { |
| 55 | return f; |
| 56 | } |
| 57 | } |
| 58 | return panic(`Required field ${name} not defined on type ${t.name}.`); |
| 59 | } |
| 60 | |
| 61 | function makeTypeNames( |
| 62 | name: string, |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…