graphql: add muted attribute to assignments

closes RECNVS-408

Test plan:
  query assignment muted status with graphql

Change-Id: Ia29d34f4652ddc6a93851a3fa7a1fd88d7af144e
Reviewed-on: https://gerrit.instructure.com/145935
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
This commit is contained in:
Cameron Matheson 2018-04-04 15:20:12 -06:00
parent 67e15848ee
commit 75b43e3f47
3 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,8 @@ module Types
"when this assignment is due",
property: :due_at
field :muted, types.Boolean, property: :muted?
field :state, !AssignmentState, property: :workflow_state
field :assignmentGroup, AssignmentGroupType, resolve: ->(assignment, _, _) {

View File

@ -30,6 +30,7 @@ type Assignment implements Node, Timestamped {
gradingType: GradingType
htmlUrl: URL
id: ID!
muted: Boolean
name: String
needsGradingCount: Int

View File

@ -58,6 +58,7 @@ describe Types::AssignmentType do
expect(assignment_type.state).to eq assignment.workflow_state
expect(assignment_type.onlyVisibleToOverrides).to eq assignment.only_visible_to_overrides
expect(assignment_type.assignmentGroup).to eq assignment.assignment_group
expect(assignment_type.muted).to eq assignment.muted?
end
describe "submissionsConnection" do