'How to get instance from global id in Django with Graphene Relay

graphql_relay has a function from_global_id which returns the model_name and the instance_id.

However, it seems that to retrieve the model from the name of the model, we need to know in which app the model is, such as answers in the question asking how to get the model from its name.

Is there a way to know the name of the app from the global id? Or is there any other way to retrieve the instance?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source