ScenicFramework / scenic

Core Scenic library
Apache License 2.0
1.99k stars 137 forks source link

find should always return a full primitive #332

Open vacarsu opened 1 year ago

vacarsu commented 1 year ago

Description

Changes Graph.find/2 to pass a full primitive instead of just the primitive's id to the finder function.

Also adds a Graph.find_by_id/2 method to preserve the api, primarily for Graph.modify and for any one else who may be calling find.

Motivation and Context

According to the docs, this should pass a full primitive.

Types of changes

This could potentially break other code using Graph.find/2 currently expecting a primitive id.