def global_id_field(type_name, id_fetcher=None):
    return GraphQLField(
        GraphQLNonNull(GraphQLID),
        description='The ID of an object',
        resolver=lambda obj, *
        _: to_global_id(type_name, id_fetcher(obj) if id_fetcher else obj.id)
    )
Creates the configuration for an id field on a node, using `to_global_id` to
dataset/ETHPy150Open graphql-python/graphql-relay-py/graphql_relay/node/node.py/global_id_field