You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Important:** GraphQL queries containing non-null type markers (e.g. `String` followed by an exclamation mark) must be passed via heredoc stdin to avoid escaping issues. Simple queries without those markers can be passed inline.
128
+
127
129
```bash
128
-
# Simple query
130
+
# Simple query (no type markers, so inline is fine)
129
131
linear api '{ viewer { id name email } }'
130
132
131
-
# Query with variables (coerces types: booleans, numbers, null)
132
-
linear api 'query($teamId: String!) { team(id: $teamId) { name } }' --variable teamId=abc123
133
+
# Query with variables — use heredoc to avoid escaping issues
134
+
linear api --variable teamId=abc123 <<'GRAPHQL'
135
+
query($teamId: String!) { team(id: $teamId) { name } }
136
+
GRAPHQL
137
+
138
+
# Search issues by text
139
+
linear api --variable term=onboarding <<'GRAPHQL'
140
+
query($term: String!) { searchIssues(term: $term, first: 20) { nodes { identifier title state { name } } } }
141
+
GRAPHQL
133
142
134
143
# Numeric and boolean variables
135
-
linear api 'query($first: Int!) { issues(first: $first) { nodes { title } } }' --variable first=5
**Important:** GraphQL queries containing non-null type markers (e.g. `String` followed by an exclamation mark) must be passed via heredoc stdin to avoid escaping issues. Simple queries without those markers can be passed inline.
102
+
101
103
```bash
102
-
# Simple query
104
+
# Simple query (no type markers, so inline is fine)
103
105
linear api '{ viewer { id name email } }'
104
106
105
-
# Query with variables (coerces types: booleans, numbers, null)
106
-
linear api 'query($teamId: String!) { team(id: $teamId) { name } }' --variable teamId=abc123
107
+
# Query with variables — use heredoc to avoid escaping issues
108
+
linear api --variable teamId=abc123 <<'GRAPHQL'
109
+
query($teamId: String!) { team(id: $teamId) { name } }
110
+
GRAPHQL
111
+
112
+
# Search issues by text
113
+
linear api --variable term=onboarding <<'GRAPHQL'
114
+
query($term: String!) { searchIssues(term: $term, first: 20) { nodes { identifier title state { name } } } }
115
+
GRAPHQL
107
116
108
117
# Numeric and boolean variables
109
-
linear api 'query($first: Int!) { issues(first: $first) { nodes { title } } }' --variable first=5
0 commit comments