graphql: fix assignment/assignmentGroup fields
These were only working with legacy ids. Test plan: load an assignment/assignmentGroup at the top-level closes GQL-13 Change-Id: I4ac7f1277ffebbf419202dc93dcd2c0d0bde51e8 Reviewed-on: https://gerrit.instructure.com/171128 Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com> Tested-by: Jenkins QA-Review: Cameron Matheson <cameron@instructure.com> Product-Review: Cameron Matheson <cameron@instructure.com>
This commit is contained in:
parent
eeda02b181
commit
6592f3cd72
|
@ -41,7 +41,7 @@ module Types
|
|||
|
||||
field :assignment, Types::AssignmentType, null: true do
|
||||
argument :id, ID, "a graphql or legacy id", required: true,
|
||||
prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("Course")
|
||||
prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("Assignment")
|
||||
end
|
||||
def assignment(id:)
|
||||
GraphQLNodeLoader.load("Assignment", id, context)
|
||||
|
@ -49,7 +49,7 @@ module Types
|
|||
|
||||
field :assignment_group, Types::AssignmentGroupType, null: true do
|
||||
argument :id, ID, "a graphql or legacy id", required: true,
|
||||
prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("Course")
|
||||
prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("AssignmentGroup")
|
||||
end
|
||||
def assignment_group(id:)
|
||||
GraphQLNodeLoader.load("AssignmentGroup", id, context)
|
||||
|
|
Loading…
Reference in New Issue