feature: backend should construct HFID for an upsert mutation #45
Labels
priority/2
This issue stalls work on the project or its dependents, it's a blocker for a release
type/feature
New feature or request
Component
API Server / GraphQL
Describe the Feature Request
An upsert mutation today requires that you provide an HFID for the node you want to upsert. This is needed to be able to uniquely identify a node in the database. Basically we require the client what the HFID of a node is to send that as part of the upsert GraphQL mutation.
Giving this responsibility to the client/consumer becomes more difficult when the HFID of a node exists out of a relationship. Because then the client would need to retrieve the related node to be able to construct the HFID of the node it wants to upsert.
This feature request is to drop the requirement for a client to send the HFID as part of the upsert mutation. Instead the backend should, based on the schema, be able to construct the HFID for the node for which we receive the upsert mutation.
Describe the Use Case
We should be able to upsert a node which has an HFID which exists out of a relationship of the node, without fetching the related node of from Infrahub.
For example, given the demo schema and data, if you want to upsert an interface "Ethernet1" for "atl-1-edge1" using the SDK then we would first need to retrieve the related node (= device)
What we want to achieve instead is that we can use the hfid of the device instead.
Additional Information
No response
The text was updated successfully, but these errors were encountered: