Add warning if graphql field is missing during fleet update
What does this MR do and why?
Usually we are not allowed, to release both GraphQL backend and frontend counterpart in the same milestone, due to our Backwards compatibility policy
This might impact a team iteration and velocity
This MR is an experiment if we're ok to have backend and frontend GraphQL in the same milestone, considering following:
- we're able to detect that graphql error we're receiving is due to "mid-flight upgrade" process and we're properly communicating it to user
- we're ok (from product perspective) having functionality temporary unavailable
It is agreed with PM/EM of groupcompliance @nrosandich @khornergit
If the experiment will go ok, we might consider spreading this pattern by adding it to the docs
Screenshots or screen recordings
How to set up and validate locally
Apply following patch to simulate "non-existent fields" which happens when frontend already has new changes, but backend does not:
diff --git a/ee/app/graphql/ee/types/project_type.rb b/ee/app/graphql/ee/types/project_type.rb
index 7a8e477df0f0..49dfef5c7752 100644
--- a/ee/app/graphql/ee/types/project_type.rb
+++ b/ee/app/graphql/ee/types/project_type.rb
@@ -56,20 +56,6 @@ module ProjectType
description: 'Compliance frameworks associated with the project.',
null: true
- field :merge_request_violations,
- ::Types::ComplianceManagement::MergeRequests::ComplianceViolationType.connection_type,
- null: true,
- description: 'Compliance violations reported on merge requests merged within the project.',
- resolver: ::Resolvers::ComplianceManagement::MergeRequests::ProjectComplianceViolationResolver,
- authorize: :read_compliance_violations_report
-
- field :project_compliance_standards_adherence,
- ::Types::Projects::ComplianceStandards::AdherenceType.connection_type,
- null: true,
- description: 'Compliance standards adherence for the project.',
- resolver: ::Resolvers::Projects::ComplianceStandards::ProjectAdherenceResolver,
- authorize: :read_compliance_adherence_report
-
field :security_dashboard_path, GraphQL::Types::String,
description: "Path to project's security dashboard.",
null: true
- Open any project,
Secure > Compliance center
- Observe error
Edited by Illya Klymov