I have a setup that uses laravel and lighthouse to create a graphql setup. I've gone through the tutorials on lighthouses page and it's worked great. In my use case, however, i'm looking to simplify the use of an xml Soap API using it.
I can't find in the documentation how to do this other than creating "resolvers", which i've managed to do. However these are set to fields..? So in order to return the correct information from the other api i'd have to do one for each field?
I'm getting a little lost.
Simply put, i just need to ask:
How do i plug in an external api so when i make a call with graphql it returns information from the api?
So i ended up using lighthouses built-in artisan function to create a custom resolver:
php artisan lighthouse:query
The file that is created from this in the graphql folder in the root of laravel allows me to input and output what i need correctly. I'll basically be using this file to do the calls and returning the response.
Thank you for the help :)