You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're referring to a mapper from existing APIs to graphene types similar to the sqlalchemydjango and mongodb integrations, then no there is nothing like that. Additionally, I'd advise you to use aiodataloader + graphene v3 since the old promise library can be considered legacy. Sadly, the graphene docs are outdated and don't incorporate the new dataloader. You can check out examples here: https://github.com/syrusakbary/aiodataloader
This works very similar to the JS tutorial. As mentioned above, you will need to use aiodataloader. Now you need to create your graphene object types with the correctly typed fields. Then create data loaders for all the object types. These should return an instance of the object type based on the object id. Inside of the dataloaders you can use httpx, requests or other HTTP clients to make your rest calls.
Let me know if that works for you.
Is there a feature already existing for dataLoaders to load graphene RESTFUL APIs as datasource
current Behaviour
https://docs.graphene-python.org/en/latest/execution/dataloader/#using-with-graphene
Existing docs provide info to load the data from database and load dataloaders by filtering id.
Please suggest if there a way to use dataloaders for existing REST APIs as data source.
Couldn't find it anywhere in docs
https://stackoverflow.com/questions/48541204/graphene-relation-using-restfull-api-as-data-source
https://stackoverflow.com/questions/72544729/graphql-wrapper-for-rest-apis-with-django?noredirect=1&lq=1
The text was updated successfully, but these errors were encountered: