In GraphQL API for BranchProtection Object fields are missing compared to UI settings - so not able to collect data #170601
-
Select Topic AreaQuestion BodyHi Team, I am Using GraphQL API to collect data related to Branch Protection for the fields mentioned - here Restrict pushes that create matching branches
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @ns-manojs I looked into your question about Branch Protection and the missing Why
|
| Setting | GraphQL Support | Access Method |
|---|---|---|
| Restrict pushes (branch level) | Yes (restrictsPushes) |
Use BranchProtectionRule.restrictsPushes |
| Merge Queue configuration (branch) | Not available | No schema field in BranchProtectionRule |
| Merge Queue status (repository) | Yes (mergeQueue) |
Query repository-level mergeQueue |
At this time, neither GraphQL nor REST APIs expose whether Merge Queue is enabled for a branch protection rule. The only API access available is the repository-level queue, which shows entries but not the rule-level enablement setting.
If reading the enablement setting is critical for your automation, you may consider filing a feature request so that Merge Queue configuration is exposed in the schema.
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.


Hi @ns-manojs
I looked into your question about Branch Protection and the missing
mergeQueueandrestrict pushesfields in GraphQL and thought I would share what I found. Hopefully this helps point you in the right direction.Why
mergeQueueis missing inBranchProtectionRuleThe GraphQL
BranchProtectionRuleobject does not include amergeQueuefield. Merge Queue is not exposed in that part of the schema. The only accessiblemergeQueuefield in GraphQL exists at the repository level, where you can query current entries, their state, position, and related data. There is no GraphQL schema field that lets you check if Merge Queue is enabled for a specific branch protection rule. (GitHub Docs, …