summaryrefslogtreecommitdiff
path: root/app/graphql/types/issue_connection.rb
blob: 8e5c88648eab4c9ace5451d3b0983114fe318bb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

# Normally this wouldn't be needed and we could use
#   type Types::IssueType.connection_type, null: true
# in a resolver. However we can end up with cyclic definitions,
# which can result in errors like
#   NameError: uninitialized constant Resolvers::GroupIssuesResolver
#
# Now we would use
#   type "Types::IssueConnection", null: true
# which gives a delayed resolution, and the proper connection type.
# See app/graphql/resolvers/base_issues_resolver.rb
# Reference: https://github.com/rmosolgo/graphql-ruby/issues/3974#issuecomment-1084444214

Types::IssueConnection = Types::IssueType.connection_type