From aea98f9d24e9eba3ae82bb789a1bcb12f62f5324 Mon Sep 17 00:00:00 2001 From: Alana Luyten Date: Sun, 6 Nov 2022 18:30:31 +0100 Subject: [PATCH] feat(workflow): include family field on case schema model Allow the family field to be fetched through GraphQL for the case model. --- caluma/caluma_workflow/schema.py | 2 +- caluma/tests/__snapshots__/test_schema.ambr | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/caluma/caluma_workflow/schema.py b/caluma/caluma_workflow/schema.py index 174368d32..0b38c2ce8 100644 --- a/caluma/caluma_workflow/schema.py +++ b/caluma/caluma_workflow/schema.py @@ -239,9 +239,9 @@ def resolve_family_work_items(self, info, **args): class Meta: model = models.Case - exclude = ("family",) interfaces = (relay.Node,) connection_class = CountableConnectionBase + fields = "__all__" class SaveWorkflow(UserDefinedPrimaryKeyMixin, Mutation): diff --git a/caluma/tests/__snapshots__/test_schema.ambr b/caluma/tests/__snapshots__/test_schema.ambr index c6e8c3d6d..217bc9838 100644 --- a/caluma/tests/__snapshots__/test_schema.ambr +++ b/caluma/tests/__snapshots__/test_schema.ambr @@ -466,6 +466,9 @@ """The ID of the object""" id: ID! + """Family id which case belongs to.""" + family: Case + """Time when case has either been canceled or completed""" closedAt: DateTime closedByUser: String