Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

graphql to search for all components

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2023

Hi All,

 

I am looking for some examples on using the graphql api to search for components. I probably can push my way through, but if there are examples available, it would accelerate my efforts.

 

I am specifically looking to create the following queries:

  • Return all components
  • Return component by name

Thank you

2 answers

1 vote
ForgedApps
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 13, 2024

To retrieve all components you can use an empty object as the query, so `query: {}` as in:

query example {
compass {
searchComponents(cloudId: "", query:{}) {
... on CompassSearchComponentConnection {
nodes {
link
component {
name
description
typeId
ownerId
links {
id
type
name
url
}
labels {
name
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
... on QueryError {
message
extensions {
statusCode
errorType
}
}
}
}
}

 

1 vote
Pavel Shkleinik
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2023

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events