(environment: Environment, config: Config)
| 27 | type Config = Omit<MutationConfig<createGithubSessionMutation>, 'mutation'> |
| 28 | |
| 29 | function createSession(environment: Environment, config: Config) { |
| 30 | return commitMutation<createGithubSessionMutation>( |
| 31 | // @ts-expect-error |
| 32 | environment, { ...config, mutation: createGithubSessionQuery }, |
| 33 | ) |
| 34 | } |
| 35 | |
| 36 | const primaryOrFirstEmail = (emails: Email[]) => { |
| 37 | const matches = emails.filter(({ primary }) => primary) |