diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index 3c996978b6d752391341a8acd6674bd6756a9903..592167a633ba80fad9b4c24d2b885e466d7ad452 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -144,4 +144,15 @@ def max_query_depth(ctx) end end -GitlabSchema.prepend_if_ee('EE::GitlabSchema') +GitlabSchema.prepend_if_ee('EE::GitlabSchema') # rubocop: disable Cop/InjectEnterpriseEditionModule + +# Force the schema to load as a workaround for intermittent errors we +# see due to a lack of thread safety. +# +# TODO: We can remove this workaround when we convert the schema to use +# the new query interpreter runtime. +# +# See: +# - https://gitlab.com/gitlab-org/gitlab/-/issues/211478 +# - https://gitlab.com/gitlab-org/gitlab/-/issues/210556 +GitlabSchema.graphql_definition