javascript – How do make a GraphQL API call from within a Remix.run Loader?

I don’t really understand loaders in remix.

I got a resource route. When it gets a GET request the loader runs and receives data from the searchparameters. Now how do I use this data to make a GraphQL API call to another server and return the results of that API call to the first GET request?

I understand, that I can use a loader for API calls to, but not the same one. So I need another route right? But I can’t get the data from the first route to another one without using useFetcher() right? And that would block the loader/action on the second route again right?

Read more here: Source link