When an attribute of a node is marked as read_only and it has a default value the frontend tries to use this default value in a mutation, the action is rejected by the backend as the attribute doesn't exist in the input schema for the node.
Expected Behavior
The frontend should never attempt to use read_only attributes in a mutation.
Steps to Reproduce
Load this schema to Infrahub:
# yaml-language-server: $schema=https://schema.infrahub.app/develop/schema.schema.json
---
version: '1.0'
nodes:
- name: Ticket
namespace: Support
label: "Ticket"
display_labels:
- title__value
generate_profile: true
attributes:
- name: title
kind: Text
description: "The title of the ticket"
- name: system
description: "The description of the ticket"
kind: Boolean
optional: true
default_value: true
read_only: true
Try to create a node of this object
Observe that the operation fails and the mutation looks like this:
Component
Frontend UI
Current Behavior
When an attribute of a node is marked as read_only and it has a default value the frontend tries to use this default value in a mutation, the action is rejected by the backend as the attribute doesn't exist in the input schema for the node.
Expected Behavior
The frontend should never attempt to use read_only attributes in a mutation.
Steps to Reproduce
Additional Information
No response