(form: SquadForm)
| 1180 | }); |
| 1181 | |
| 1182 | export async function createSquad(form: SquadForm): Promise<Squad> { |
| 1183 | const { description, ...inputData } = formToInput(form); |
| 1184 | // The API rejects an empty description, so a squad created without one |
| 1185 | // (the Startups company step asks only for a name) leaves it out |
| 1186 | const data = await gqlClient.request(CREATE_SQUAD_MUTATION, { |
| 1187 | ...inputData, |
| 1188 | ...(description ? { description } : {}), |
| 1189 | ...(form.company && { company: true }), |
| 1190 | }); |
| 1191 | |
| 1192 | return data.createSquad; |
| 1193 | } |
| 1194 | |
| 1195 | interface EditSquadMutation { |
| 1196 | id: string; |
nothing calls this directly
no test coverage detected