The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Forged Apps
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
TAGS
AUG Leaders

Atlassian Community Events