Skip to content

Commit

Permalink
wait for mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Nov 8, 2024
1 parent 81eaea8 commit 94d02e3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions grievance_social_protection/schema.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import graphene
from django.contrib.auth.models import AnonymousUser

from core.schema import OrderedDjangoFilterConnectionField
from core.schema import signal_mutation_module_validate
from core.schema import (
OrderedDjangoFilterConnectionField,
signal_mutation_module_validate
)
from core.service import wait_for_mutation

from django.db.models import Q
import graphene_django_optimizer as gql_optimizer

Expand Down Expand Up @@ -70,6 +74,7 @@ def resolve_tickets(self, info, **kwargs):

client_mutation_id = kwargs.get("client_mutation_id", None)
if client_mutation_id:
wait_for_mutation(client_mutation_id)
filters.append(Q(mutations__mutation__client_mutation_id=client_mutation_id))

# Used to specify if user want to see all records including invalid records as history
Expand Down Expand Up @@ -100,6 +105,7 @@ def resolve_ticketsStr(self, info, **kwargs):

client_mutation_id = kwargs.get("client_mutation_id", None)
if client_mutation_id:
wait_for_mutation(client_mutation_id)
filters.append(Q(mutations__mutation__client_mutation_id=client_mutation_id))

# str = kwargs.get('str')
Expand Down

0 comments on commit 94d02e3

Please sign in to comment.