( schedule: Schedule.Schedule<Output, GraphQLClientError, Error, Env> )
| 319 | // errors and fatal errors end the retries before reaching it, so a custom |
| 320 | // schedule can rely on its input being a `GraphQLClientError`. |
| 321 | const retryableOnly = <Output, Error, Env>( |
| 322 | schedule: Schedule.Schedule<Output, GraphQLClientError, Error, Env> |
| 323 | ): Schedule.Schedule<Output | undefined, unknown, Error, Env> => |
| 324 | Schedule.fromStep(Effect.map( |
| 325 | Schedule.toStep(schedule), |
| 326 | (step) => |
| 327 | (now: number, input: unknown): Pull.Pull<[Output | undefined, Duration.Duration], Error, Output | undefined, Env> => |
| 328 | isGraphQLClientError(input) && input.isRetryable ? step(now, input) : Cause.done(undefined) |
| 329 | )) |
| 330 | |
| 331 | // `status` and `headers` are transport metadata, never read from the body. |
| 332 | const decodeExecutionResult = Schema.decodeUnknownEffect(ExecutionResult.mapFields(Struct.omit(["status", "headers"]))) |
no test coverage detected