Ejemplo n.º 1
0
class Query(object):
    all_categories = DjangoFilterPaginateListField(
        CategoryType,
        description='all categories query',
        pagination=LimitOffsetGraphqlPagination())
    all_ingredients = DjangoFilterPaginateListField(
        IngredientType,
        description='all ingredients query',
        pagination=LimitOffsetGraphqlPagination())
    category = DjangoObjectField(CategoryType,
                                 description='A certain category')
    ingredient = DjangoObjectField(IngredientType,
                                   description='A certain Ingredient')
Ejemplo n.º 2
0
class ClientQuery(object):
    clients = DjangoFilterPaginateListField(
        ClientType,
        pagination=LimitOffsetGraphqlPagination(ordering="raison_social"),
    )
    all_clients = DjangoListObjectField(ClientListType)
    client = DjangoObjectField(ClientType)
 class Meta:
     description = 'Type definition for a Group'
     serializer_class = GroupSerializer
     input_field_name = 'newGroup'
     output_field_name = 'group'
     pagination = LimitOffsetGraphqlPagination(default_limit=10,
                                               ordering='-name')
     filter_fields = {
         'name': ['exact', 'icontains'],
     }
 class Meta:
     description = 'Type definition for a TagRealmAssociation'
     serializer_class = TagRealmAssociationSerializer
     input_field_name = 'newAssociation'
     output_field_name = 'association'
     pagination = LimitOffsetGraphqlPagination()
     filter_fields = {
         'id': ['exact', ],
         'tag': ['exact', ],
         'realm': ['exact', ]
     }
 class Meta:
     description = 'Type definition for a Tag'
     serializer_class = TagSerializer
     input_field_name = 'newTag'
     output_field_name = 'tag'
     pagination = LimitOffsetGraphqlPagination(default_limit=10)
     only_fields = ['id', 'created', 'modified', 'user', ]
     filter_fields = {
         'id': ['exact', ],
         'user': ['exact', ]
     }
Ejemplo n.º 6
0
 class Meta:
     description = 'Type definition for a User'
     serializer_class = UserSerializer
     input_field_name = 'newUser'
     output_field_name = 'user'
     pagination = LimitOffsetGraphqlPagination(default_limit=10, ordering='-username')
     filter_fields = {
         'username': ['exact', 'icontains'],
         'email': ['exact', 'icontains'],
         'first_name': ['exact', 'icontains'],
         'last_name': ['exact', 'icontains'],
     }
Ejemplo n.º 7
0
    class Meta:
        name = 'ClientListType'
        model = models.Client
        filterset_class = filters.ClientFilters

        # filter_fields = {
        #     'id': ("exact",),
        #     'raison_social': ("exact", 'icontains'),
        #     'code_client': ("exact", 'icontains'),
        #     # 'barem': ("exact",),

        # }
        pagination = LimitOffsetGraphqlPagination()
 class Meta:
     description = 'Type definition for an Access Point'
     serializer_class = AccessPointSerializer
     input_field_name = 'newAccessPoint'
     output_field_name = 'accessPoint'
     pagination = LimitOffsetGraphqlPagination(default_limit=10,
                                               ordering='-name')
     filter_fields = {
         'id': [
             'exact',
         ],
         'name': ['iexact', 'icontains'],
         'location': ['iexact', 'icontains'],
     }
Ejemplo n.º 9
0
 class Meta:
     name = 'ContactListType'
     model = models.Contact
     filter_fields = {
         'id': ('exact', ),
         'nom': (
             'exact',
             'icontains',
         ),
         'prenom': (
             'exact',
             'icontains',
         ),
         'phone': (
             'exact',
             'icontains',
         ),
         'email': (
             'exact',
             'icontains',
         ),
         'client': ('exact', ),
     }
     pagination = LimitOffsetGraphqlPagination()
Ejemplo n.º 10
0
class EngineCapacityQuery(object):
    enginecapacitys = DjangoFilterPaginateListField(
        EngineCapacityType, pagination=LimitOffsetGraphqlPagination())
    all_enginecapacitys = DjangoListObjectField(EngineCapacityListType)
    enginecapacity = DjangoObjectField(EngineCapacityType)
Ejemplo n.º 11
0
class Query(graphene.ObjectType):
    user = DjangoObjectField(UserType, description='Single User query')
    all_users = DjangoFilterPaginateListField(UserType, pagination=LimitOffsetGraphqlPagination())
Ejemplo n.º 12
0
 class Meta(object):
     serializer_class = EventCategorySerializer
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="id")
Ejemplo n.º 13
0
 class Meta(object):
     serializer_class = SpeakerSerializer
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="id")
Ejemplo n.º 14
0
class EngineQuery(object):
    engines = DjangoFilterPaginateListField(
        EngineType, pagination=LimitOffsetGraphqlPagination())
    all_engines = DjangoListObjectField(EngineListType)
    engine = DjangoObjectField(EngineType)
Ejemplo n.º 15
0
 class Meta:
     description = " Type definition for user list "
     model = models.Sample
     pagination = LimitOffsetGraphqlPagination(default_limit=10,
                                               ordering="sample_id")
Ejemplo n.º 16
0
 class Meta:
     model = Product
     pagination = LimitOffsetGraphqlPagination(default_limit=25)
Ejemplo n.º 17
0
 class Meta:
     model = Presentation
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="id")
     filter_fields = ["id", "title"]
Ejemplo n.º 18
0
 class Meta:
     name = 'ProfileListType'
     model = models.Profile
     filter_fields = '__all__'
     pagination = LimitOffsetGraphqlPagination()
Ejemplo n.º 19
0
 class Meta:
     name = 'ChaufeurListType'
     model = models.Chaufeur
     filterset_class = filters.ChaufeurFilters
     pagination = LimitOffsetGraphqlPagination()
Ejemplo n.º 20
0
 class Meta:
     name = 'EngineListType'
     model = models.Engine
     filterset_class = filters.EngineFilters
     pagination = LimitOffsetGraphqlPagination()
Ejemplo n.º 21
0
class ChaufeurQuery(object):
    chaufeurs = DjangoFilterPaginateListField(
        ChaufeurType, pagination=LimitOffsetGraphqlPagination())
    all_chaufeurs = DjangoListObjectField(ChaufeurListType)
    chaufeur = DjangoObjectField(ChaufeurType)
Ejemplo n.º 22
0
class ContactQuery(object):
    contacts = DjangoFilterPaginateListField(
        ContactType, pagination=LimitOffsetGraphqlPagination())
    all_contacts = DjangoListObjectField(ContactListType)
    contact = DjangoObjectField(ContactType)
Ejemplo n.º 23
0
 class Meta:
     model = Tag
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="tag")
     filter_fields = ["tag", "events"]
Ejemplo n.º 24
0
 class Meta:
     model = Metric
     pagination = LimitOffsetGraphqlPagination(default_limit=100, ordering="ingress_date")
     filter_fields = ["id", "ingress_date", "member_id", "summit_id", "event_id"]
Ejemplo n.º 25
0
 class Meta:
     serializer_class = PresentationSerializer
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="id")
Ejemplo n.º 26
0
 class Meta:
     model = EventFeedback
     pagination = LimitOffsetGraphqlPagination(default_limit=3000, ordering="-rate")
     filter_fields = ["avg"]
Ejemplo n.º 27
0
class EngineModelQuery(object):
    enginemodels = DjangoFilterPaginateListField(
        EngineModelType, pagination=LimitOffsetGraphqlPagination())
    all_enginemodels = DjangoListObjectField(EngineModelListType)
    enginemodel = DjangoObjectField(EngineModelType)