(name: string, opts?: { alias?: string; args?: any[]; children?: any[] })
| 5 | |
| 6 | // AST node helpers |
| 7 | const field = (name: string, opts?: { alias?: string; args?: any[]; children?: any[] }) => |
| 8 | ({ |
| 9 | kind: 'Field', |
| 10 | name: { value: name }, |
| 11 | ...(opts?.alias && { alias: { value: opts.alias } }), |
| 12 | ...(opts?.args && { arguments: opts.args }), |
| 13 | ...(opts?.children && { selectionSet: { selections: opts.children } }), |
| 14 | }) as unknown as SelectionNode; |
| 15 | |
| 16 | const inlineFragment = (type: string, children: any[]) => |
| 17 | ({ |