File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ export class Constellation {
6262 filterByDids : [ string ] [ ] = [ ] ,
6363 ttl : number | undefined = undefined ,
6464 ) {
65+ // Note that using Client from @atproto /lex here is kinda "hard" because it
66+ // expects a native fetch implementation, which is "hard" to provide using
67+ // this.cachedFetch as underlying fetch implementation. In addition to this,
68+ // blue.microcosm.links.getBacklinks is not a published lexicon, meaning
69+ // that we cannot install it using `pnpm exec lex install
70+ // blue.microcosm.links.getBacklinks` and get generated type definitions,
71+ // which kinda defeats the purpose of using Client in the first place. For
72+ // these reasons, we are using this.cachedFetch directly to call the
73+ // constellation API endpoint, and type casting the response.
6574 const source = encodeURIComponent ( `${ collection } :${ recordPath } ` )
6675 let urlToCall = `https://${ CONSTELLATION_HOST } /xrpc/blue.microcosm.links.getBacklinks?subject=${ encodeURIComponent ( subject ) } &source=${ source } &limit=${ limit } `
6776 if ( cursor ) urlToCall += `&cursor=${ cursor } `
You can’t perform that action at this time.
0 commit comments