Frontend sends unsupported includeForked parameter to blobSearch GraphQL query
Summary
Frontend code in scope_sidebar_navigation.vue is sending an unsupported includeForked parameter to the blobSearch GraphQL query, causing GraphQL errors since the backend only accepts excludeForks.
Related to: 2026-02-14: GraphQL query error rate violating ... (gitlab-com/gl-infra/production#21292 - closed) - GraphQL query error rate violating SLO in main stage
Severity: High - Causing 0.6035% GraphQL error rate in production
Steps to reproduce
- Navigate to GitLab global search (no group/project context)
- Open browser DevTools → Network tab
- Perform a blob/code search
- Inspect the
blobSearchGraphQL request payload
What is the current bug behavior?
The frontend sends a GraphQL query with the unsupported parameter:
{
search: "test",
chunkCount: 5,
groupId: undefined,
projectId: undefined,
includeArchived: false,
includeForked: false, // ❌ Unsupported parameter
regex: false
}
Result: Backend rejects the request with a GraphQL error because includeForked is not a valid argument for blobSearch.
What is the expected correct behavior?
The frontend should send the correct parameter:
{
search: "test",
chunkCount: 5,
groupId: undefined,
projectId: undefined,
includeArchived: false,
excludeForks: true, // ✅ Correct parameter
regex: false
}
Result: Backend accepts the request and returns search results successfully.
Root Cause
This is a parameter mismatch between the Vue component and the GraphQL query/backend:
-
GraphQL Query (
blob_search_zoekt_count_only.query.graphqlline 8) declares:$excludeForks: Boolean -
Backend (
blob_search_resolver.rbline 15) accepts:argument :exclude_forks, GraphQL::Types::Boolean, required: false, default_value: true -
BUT Frontend (
scope_sidebar_navigation.vueline 35) passes:includeForked: parseBoolean(this.query.include_forked), // ❌ Wrong parameter!
Timeline
-
May 13, 2025 (commit
d674115dc1c4): GraphQL query updated to useexcludeForks -
May 21, 2025 (commit
67a94f91248d): Backend removedinclude_forkedparameter -
BUT:
scope_sidebar_navigation.vuewas never updated - Feb 12, 2026: Deployed to production → Incident began
Relevant logs and/or screenshots
Error in production:
- GraphQL error rate: 0.6035%
- Alert:
ApiServiceGraphqlQueryErrorSLOViolation - Source: Small number of customers from two remote IP addresses
GraphQL Error Message:
Field 'includeForked' doesn't exist on type 'Query.blobSearch'
Possible fixes
Fix Location
File: app/assets/javascripts/search/sidebar/components/scope_sidebar_navigation.vue
Line 35 - Change:
includeForked: parseBoolean(this.query.include_forked),
To:
excludeForks: parseBoolean(this.query.exclude_forks),
Rationale:
- The UI filter (
forks_filter/index.vue) writesexclude_forksto URL query params - The GraphQL query expects
excludeForks - The backend accepts
exclude_forks - All use the same semantics (no logic inversion needed)
Test Updates
File: spec/frontend/search/sidebar/components/scope_sidebar_navigation_spec.js
Lines 153 and 177 - Change:
includeForked: false,
To:
excludeForks: true,
Why Tests Didn't Catch This
The unit tests were validating the wrong behavior. They expected includeForked to be sent:
it('makes graphql query with correct variables for group search', () => {
expect(blobCountHandler).toHaveBeenCalledWith({
// ...
includeForked: false, // ❌ Test expects wrong parameter
// ...
});
});
The tests passed even though the code was sending an unsupported parameter!
Additional Context
Related MRs:
- !222813 (merged) - Removed orphaned feature flag but missed this issue
- Original conversion MR that updated GraphQL query but missed Vue component
Incident Reference:
- INC-7434 - GraphQL query error rate violating SLO in main stage
- Slack: #inc-7434-graphql-query-error-rate-violating-slo-in-main-stage
- Runbook: https://runbooks.gitlab.com/api/#alerts
Files Affected:
-
app/assets/javascripts/search/sidebar/components/scope_sidebar_navigation.vue(needs fix) -
spec/frontend/search/sidebar/components/scope_sidebar_navigation_spec.js(needs fix)
Related Files (for context):
-
app/assets/javascripts/search/graphql/blob_search_zoekt_count_only.query.graphql(already correct) -
ee/app/graphql/resolvers/search/blob/blob_search_resolver.rb(already correct) -
app/assets/javascripts/search/sidebar/components/forks_filter/index.vue(already correct)