-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List and delete policy renewals with gql or when renewing policy
Policy renewals were directly exposed by the C# REST API. The policy mobile app needs to list, delete, and add policy renewals. The GraphQL API didn't allow to do so. With the present change, we can now list and delete policy renewals with a GrapQL query and mutation (resp.). As there is already a mutation to renew a given policy, we haven't added a dedicated GraphQL mutation to add a policy renewal independently. As there is a background task scheduling policy renewals, we are now soft deleting the renewals of a given policy when we manually renew it.
- Loading branch information
Showing
6 changed files
with
128 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 3.2.19 on 2023-08-30 16:33 | ||
|
||
import core.models | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0023_alter_jsonext_column_in_tblOfficer'), | ||
('policy', '0007_fix_policy_mutation_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PolicyRenewalMutation', | ||
fields=[ | ||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('mutation', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='policy_renewals', to='core.mutationlog')), | ||
('policy_renewal', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='mutations', to='policy.policyrenewal')), | ||
], | ||
options={ | ||
'db_table': 'policy_renewal_PolicyMutation', | ||
'managed': True, | ||
}, | ||
bases=(models.Model, core.models.ObjectMutation), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters