package Ġcom . ap ol log raph ql . apollo . interceptor Ċ Ċ import Ġcom . ap ol log raph ql . apollo . api . A pol lo Experimental Ċ import Ġcom . ap ol log raph ql . apollo . api . Operation Ċ import Ġkotlinx . coroutines . flow . Flow Ċ Ċ @ A pol lo Experimental Ċ interface ĠApollo Interceptor Chain Ġ{ ĊĊĠ Ġfun Ġ< D Ġ: ĠOperation . Data > Ġproceed ( request : ĠApollo Request < D >): ĠFlow < A pol lo Response < D >> ĊĊĠ Ġfun Ġcan Pro ceed (): ĠBoolean Ċ Ċ } Ċ Ċ @ A pol lo Experimental Ċ interface ĠApollo Request Interceptor Ġ{ ĊĠ Ġfun Ġ< D Ġ: ĠOperation . Data > Ġintercept ( request : ĠApollo Request < D >, Ġchain : ĠApollo Interceptor Chain ): ĠFlow < A pol lo Response < D >> Ċ } Ċ Ċ @ A pol lo Experimental Ċ internal Ġclass ĠReal Interceptor Chain Ġprivate Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġintercept ors : ĠList < A pol lo Request Interceptor >, ĊĠĠĠ Ġprivate Ġval Ġindex : ĠInt Ċ ) Ġ: ĠApollo Interceptor Chain Ġ{ ĊĊĠ Ġconstructor ( intercept ors : ĠList < A pol lo Request Interceptor >) Ġ: Ġthis ( ĊĠĠĠĠĠ Ġintercept ors Ġ= Ġintercept ors , ĊĠĠĠĠĠ Ġindex Ġ= Ġ 0 ĊĠ Ġ) ĊĊĠ Ġoverride Ġfun Ġ< D Ġ: ĠOperation . Data > Ġproceed ( request : ĠApollo Request < D >): ĠFlow < A pol lo Response < D >> Ġ{ ĊĠĠĠ Ġcheck ( index Ġ< Ġintercept ors . size ) ĊĠĠĠ Ġreturn Ġintercept ors [ index ]. intercept ( request , ĠReal Interceptor Chain ( intercept ors Ġ= Ġintercept ors , Ġindex Ġ= Ġindex Ġ+ Ġ 1 )) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcan Pro ceed (): ĠBoolean Ġ= Ġindex Ġ< Ġintercept ors . size Ċ } Ċ