Commit afcc180c authored by Kerri Miller's avatar Kerri Miller

Merge branch 'bw-fix-id-type' into 'master'

Change GraphQL::ID_TYPE to a GlobalIDType

See merge request gitlab-org/gitlab!45833
parents 05b95ccf 0f735b74
......@@ -1244,7 +1244,6 @@ Graphql/IDType:
- 'app/graphql/mutations/snippets/destroy.rb'
- 'app/graphql/mutations/snippets/mark_as_spam.rb'
- 'app/graphql/mutations/snippets/update.rb'
- 'app/graphql/resolvers/boards_resolver.rb'
- 'app/graphql/resolvers/design_management/design_at_version_resolver.rb'
- 'app/graphql/resolvers/design_management/design_resolver.rb'
- 'app/graphql/resolvers/design_management/designs_resolver.rb'
......
......@@ -4,7 +4,7 @@ module Resolvers
class BoardsResolver < BaseResolver
type Types::BoardType, null: true
argument :id, GraphQL::ID_TYPE,
argument :id, ::Types::GlobalIDType[::Board],
required: false,
description: 'Find a board by its ID'
......@@ -23,10 +23,13 @@ module Resolvers
private
def extract_board_id(gid)
return unless gid.present?
def extract_board_id(id)
return unless id.present?
GitlabSchema.parse_gid(gid, expected_type: ::Board).model_id
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
id = Types::GlobalIDType[Board].coerce_isolated_input(id)
id.model_id
end
end
end
......@@ -7746,7 +7746,7 @@ type Group {
"""
Find a board by its ID
"""
id: ID
id: BoardID
"""
Returns the last _n_ elements from the list.
......@@ -13733,7 +13733,7 @@ type Project {
"""
Find a board by its ID
"""
id: ID
id: BoardID
"""
Returns the last _n_ elements from the list.
......
......@@ -21309,7 +21309,7 @@
"description": "Find a board by its ID",
"type": {
"kind": "SCALAR",
"name": "ID",
"name": "BoardID",
"ofType": null
},
"defaultValue": null
......@@ -40291,7 +40291,7 @@
"description": "Find a board by its ID",
"type": {
"kind": "SCALAR",
"name": "ID",
"name": "BoardID",
"ofType": null
},
"defaultValue": null
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment