I’m quite new to RWJS and I’ve been learning GraphQL through RWJS, so my question might be super simple/obvious. I tried googling and searching the forums but didn’t find anything (I probably don’t know the right terms to search for). Please let me know if this question has already been answered.
How do I add another GraphQL endpoint?
I’m using the standard RWJS GraphQL setup, I use GraphQL to CRUD my database and use Auth0 for authentication. Now I want to communicate with a third-party API that does provide a GraphQL endpoint. However, I have no idea where to start?
Any help & tips would be appreciated!
Also, I’m building a dashboard that connects a few SaaS applications, just to make my life easier without having to log in to 4 different sites. I was wondering if there’s an opinion about how one would store & refresh authentication tokens from multiple providers simultaneously?
Thank you for your help!
EDIT: here they do it using the client context, i.e. pass an extra parameter to the query/mutation. Is that something you would recommend?
Thank you for linking the issue, I didn’t come across it yet. I’ll read through it! Although on a quick glance it doesn’t look like it’s supported yet?
I found (and used) the third-party API docs, however, that case is specifically for ‘normal’ RESTful APIs rather than GraphQL APIs. I guess I could wrap every single endpoint in its own service in RWJS but that seems a bit much.
Since schema stitching isn’t supported just yet you could just use your services and make requests to whatever graphql API you want like so. graphql-request is already included in redwood.
Hi. This is exactly what I’m looking for in my current app. Any chance to get an example of this? Whatever I’m doing just doesn’t seem to work and just returns null. Thanks!