Ejemplo n.º 1
0
 def resolve_user_states(self, info, **kwargs):
     # Small correction here to change the data filter to data__contains to handle any json
     # https://docs.djangoproject.com/en/2.0/ref/contrib/postgres/fields/#std:fieldlookup-hstorefield.contains
     return UserState.objects.filter(
         **stringify_query_kwargs(UserState, kwargs)
     )
Ejemplo n.º 2
0
 def resolve_resource(self, info, **kwargs):
     return Resource.objects.get(
         **stringify_query_kwargs(Resource, kwargs)
     )
Ejemplo n.º 3
0
 def resolve_region(self, info, **kwargs):
     return Region.objects.get(
         **stringify_query_kwargs(Region, kwargs)
     )
Ejemplo n.º 4
0
 def resolve_user_state(self, info, **kwargs):
     return UserState.objects.get(
         **stringify_query_kwargs(UserState, kwargs)
     )