File: __init__.py

package info (click to toggle)
strawberry-graphql-django 0.62.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,968 kB
  • sloc: python: 27,530; sh: 17; makefile: 16
file content (91 lines) | stat: -rw-r--r-- 2,170 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import warnings
from typing import TYPE_CHECKING, Any

from . import auth, filters, mutations, ordering, pagination, relay
from .fields.field import connection, field, node, offset_paginated
from .fields.filter_order import filter_field, order_field
from .fields.filter_types import (
    BaseFilterLookup,
    ComparisonFilterLookup,
    DateFilterLookup,
    DatetimeFilterLookup,
    FilterLookup,
    RangeLookup,
    TimeFilterLookup,
)
from .fields.types import (
    DjangoFileType,
    DjangoImageType,
    DjangoModelType,
    ListInput,
    ManyToManyInput,
    ManyToOneInput,
    NodeInput,
    NodeInputPartial,
    OneToManyInput,
    OneToOneInput,
)
from .filters import filter_type, process_filters
from .mutations.mutations import input_mutation, mutation
from .ordering import Ordering, order, order_type, process_order
from .resolvers import django_resolver
from .type import input, interface, partial, type  # noqa: A004

if TYPE_CHECKING:
    from strawberry_django.filters import filter  # noqa: A004, F401

__all__ = [
    "BaseFilterLookup",
    "ComparisonFilterLookup",
    "DateFilterLookup",
    "DatetimeFilterLookup",
    "DjangoFileType",
    "DjangoImageType",
    "DjangoModelType",
    "FilterLookup",
    "ListInput",
    "ManyToManyInput",
    "ManyToOneInput",
    "NodeInput",
    "NodeInputPartial",
    "OneToManyInput",
    "OneToOneInput",
    "Ordering",
    "RangeLookup",
    "TimeFilterLookup",
    "auth",
    "connection",
    "django_resolver",
    "field",
    "filter_field",
    "filter_type",
    "filters",
    "input",
    "input_mutation",
    "interface",
    "mutation",
    "mutations",
    "node",
    "offset_paginated",
    "order",
    "order_field",
    "order_type",
    "ordering",
    "pagination",
    "partial",
    "process_filters",
    "process_order",
    "relay",
    "type",
]


def __getattr__(name: str) -> Any:
    if name == "filter":
        warnings.warn(
            "`filter` is deprecated, use `filter_type` instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return filter_type
    raise AttributeError(f"module {__name__} has no attribute {name}")