GraphQL docs generation does not handle GitLab.com? cases
See !46583 (comment 446690358)
Background
Users can currently use the GitlabSlackApplicationService
type today on GitLab.com but it is not documented in https://docs.gitlab.com/ee/api/graphql/reference/
Details
There are a few issues currently with GraphQL docs generation:
- If a code-path reaches
if ::GitLab.com?
then the GraphQL docs generation does not generate docs for this case. - If a code-path reaches
if ::GitLab.dev_env_or_com?
, then the GraphQL docs generates in dev for this case but fails in CI because thecheck-docs
job runs inRAILS_ENV=test
.
See also feature documentation for https://docs.gitlab.com/ee/user/project/integrations/gitlab_slack_application.html#gitlab-slack-application-free-only
Proposal
- Force the Rails environment to test for the generate docs task
- #209227, so that we can annotate types with tiers (e.g. Silver, or Silver/Premium)
Potential workarounds:
Use:
if ::GitLab.dev_or_test_env? || ::Gitlab.com?
Note
Ultimately, usage of GitLab.com?
should be driven to minimum in favor of other solutions but while cases like this still exists the GraphQL docs generation needs to take this in account
/cc @gitlab-org/graphql-experts