-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
linear document update fails when passing content, but works for title-only updates.
Reproduction
# Works
linear doc update abc123 --title "New Title"
# Fails — inline content
linear doc update abc123 --content "# Test heading"
# ✗ Failed to update document: Internal server error
# Fails — content from file
echo "# Test heading" > /tmp/test.md
linear doc update abc123 --content-file /tmp/test.md
# ✗ Failed to update document: Internal server errorThe equivalent GraphQL mutation works fine via linear api:
linear api "$(< query.graphql)" \
--variable 'id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \
--variable 'content=@/tmp/test.md'where query.graphql is:
mutation($id: String!, $content: String!) {
documentUpdate(id: $id, input: { content: $content }) {
success
}
}Side note: linear api escapes ! in query strings
Passing the query inline also breaks because ! gets backslash-escaped before being sent:
linear api 'mutation($id: String!, $content: String!) { ... }'
# Syntax Error: Unexpected character: "\".
# 1 | mutation($id: String\!, $content: String\!) { ...Workaround is reading the query from a file via shell substitution ($(< file)).
Environment
- linear-cli 1.10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels