-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This package can now be installed via "pip install graphene-stubs"
- Loading branch information
Showing
119 changed files
with
2,649 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2018 The Python Packaging Authority | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,7 @@ | ||
from .relay import ClientIDMutation as ClientIDMutation, Connection as Connection, ConnectionField as ConnectionField, GlobalID as GlobalID, Node as Node, PageInfo as PageInfo, is_node as is_node | ||
from .types import AbstractType as AbstractType, Argument as Argument, Boolean as Boolean, Context as Context, Date as Date, DateTime as DateTime, Decimal as Decimal, Dynamic as Dynamic, Enum as Enum, Field as Field, Float as Float, ID as ID, InputField as InputField, InputObjectType as InputObjectType, Int as Int, Interface as Interface, JSONString as JSONString, List as List, Mutation as Mutation, NonNull as NonNull, ObjectType as ObjectType, ResolveInfo as ResolveInfo, Scalar as Scalar, Schema as Schema, String as String, Time as Time, UUID as UUID, Union as Union | ||
from .utils.module_loading import lazy_import as lazy_import | ||
from .utils.resolve_only_args import resolve_only_args as resolve_only_args | ||
|
||
# Names in __all__ with no definition: | ||
# __version__ |
Empty file.
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,7 @@ | ||
from .signature import signature as signature | ||
from graphql.pyutils.compat import Enum as Enum | ||
from typing import Callable | ||
|
||
|
||
def func_name(func: Callable) -> str: | ||
... |
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,11 @@ | ||
from typing import Any, TypeVar, Type | ||
|
||
_T = TypeVar('_T', bound=object) | ||
|
||
|
||
class InitSubclassMeta(type): | ||
def __new__(cls: Type[_T], name: Any, bases: Any, ns: Any, **kwargs: Any) -> _T: | ||
... | ||
|
||
def __init__(cls, name: Any, bases: Any, ns: Any, **kwargs: Any) -> None: | ||
... |
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,137 @@ | ||
from typing import Any, Optional, TypeVar, Type | ||
|
||
|
||
def signature(obj: Any): | ||
... | ||
|
||
|
||
class _void: | ||
... | ||
|
||
|
||
class _empty: | ||
... | ||
|
||
|
||
class _ParameterKind(int): | ||
def __new__(self, *args: Any, **kwargs: Any): | ||
... | ||
|
||
|
||
_T: TypeVar('_T', bound=object) | ||
|
||
|
||
class Parameter: | ||
POSITIONAL_ONLY: Any = ... | ||
POSITIONAL_OR_KEYWORD: Any = ... | ||
VAR_POSITIONAL: Any = ... | ||
KEYWORD_ONLY: Any = ... | ||
VAR_KEYWORD: Any = ... | ||
empty: Any = ... | ||
|
||
def __init__( | ||
self, name: Any, kind: Any, default: Any = ..., annotation: Any = ..., _partial_kwarg: bool = ... | ||
) -> None: | ||
... | ||
|
||
@property | ||
def name(self) -> str: | ||
... | ||
|
||
@property | ||
def default(self) -> Any: | ||
... | ||
|
||
@property | ||
def annotation(self) -> Any: | ||
... | ||
|
||
@property | ||
def kind(self) -> Any: | ||
... | ||
|
||
def replace( | ||
self: _T, | ||
name: Any = ..., | ||
kind: Any = ..., | ||
annotation: Any = ..., | ||
default: Any = ..., | ||
_partial_kwarg: Any = ... | ||
) -> _T: | ||
... | ||
|
||
def __hash__(self) -> Any: | ||
... | ||
|
||
def __eq__(self, other: Any) -> Any: | ||
... | ||
|
||
def __ne__(self, other: Any) -> Any: | ||
... | ||
|
||
|
||
class BoundArguments: | ||
arguments: Any = ... | ||
|
||
def __init__(self, signature: Any, arguments: Any) -> None: | ||
... | ||
|
||
@property | ||
def signature(self) -> Any: | ||
... | ||
|
||
@property | ||
def args(self) -> tuple: | ||
... | ||
|
||
@property | ||
def kwargs(self) -> dict: | ||
... | ||
|
||
def __hash__(self) -> Any: | ||
... | ||
|
||
def __eq__(self, other: Any) -> bool: | ||
... | ||
|
||
def __ne__(self, other: Any) -> bool: | ||
... | ||
|
||
|
||
class Signature: | ||
empty: Any = ... | ||
|
||
def __init__( | ||
self, parameters: Optional[Any] = ..., return_annotation: Any = ..., __validate_parameters__: bool = ... | ||
) -> None: | ||
... | ||
|
||
@classmethod | ||
def from_function(cls: Type[_T], func: Any) -> _T: | ||
... | ||
|
||
@property | ||
def parameters(self) -> Any: | ||
... | ||
|
||
@property | ||
def return_annotation(self) -> Any: | ||
... | ||
|
||
def replace(self: _T, parameters: Any = ..., return_annotation: Any = ...) -> _T: | ||
... | ||
|
||
def __hash__(self) -> Any: | ||
... | ||
|
||
def __eq__(self, other: Any) -> Any: | ||
... | ||
|
||
def __ne__(self, other: Any) -> Any: | ||
... | ||
|
||
def bind(self, *args: Any, **kwargs: Any) -> Any: | ||
... | ||
|
||
def bind_partial(self, *args: Any, **kwargs: Any) -> Any: | ||
... |
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,21 @@ | ||
from typing import Any, Optional | ||
|
||
|
||
def get_version(version: Optional[Any] = ...) -> Any: | ||
... | ||
|
||
|
||
def get_main_version(version: Optional[Any] = ...) -> Any: | ||
... | ||
|
||
|
||
def get_complete_version(version: Optional[Any] = ...) -> Any: | ||
... | ||
|
||
|
||
def get_docs_version(version: Optional[Any] = ...) -> Any: | ||
... | ||
|
||
|
||
def get_git_changeset() -> Any: | ||
... |
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,3 @@ | ||
from .connection import Connection as Connection, ConnectionField as ConnectionField, PageInfo as PageInfo | ||
from .mutation import ClientIDMutation as ClientIDMutation | ||
from .node import GlobalID as GlobalID, Node as Node, is_node as is_node |
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,57 @@ | ||
from ..types import Boolean as Boolean, Enum as Enum, Int as Int, Interface as Interface, List as List, NonNull as NonNull, Scalar as Scalar, String as String, Union as Union | ||
from ..types.field import Field as Field | ||
from ..types.objecttype import ObjectType as ObjectType, ObjectTypeOptions as ObjectTypeOptions | ||
from ..utils.thenables import maybe_thenable as maybe_thenable | ||
from .node import is_node as is_node | ||
from typing import Any, Optional | ||
|
||
|
||
class PageInfo(ObjectType): | ||
class Meta: | ||
description: str = ... | ||
|
||
has_next_page: Any = ... | ||
has_previous_page: Any = ... | ||
start_cursor: Any = ... | ||
end_cursor: Any = ... | ||
|
||
|
||
class ConnectionOptions(ObjectTypeOptions): | ||
node: Any = ... | ||
|
||
|
||
class Connection(ObjectType): | ||
class Meta: | ||
abstract: bool = ... | ||
|
||
@classmethod | ||
def __init_subclass_with_meta__( # type: ignore[override] | ||
cls, | ||
node: Optional[Any] = ..., | ||
name: Optional[Any] = ..., | ||
**options: Any | ||
) -> Any: | ||
... | ||
|
||
|
||
class IterableConnectionField(Field): | ||
def __init__(self, type: Any, *args: Any, **kwargs: Any) -> None: | ||
... | ||
|
||
@property | ||
def type(self) -> Any: | ||
... | ||
|
||
@classmethod | ||
def resolve_connection(cls, connection_type: Any, args: Any, resolved: Any) -> Any: | ||
... | ||
|
||
@classmethod | ||
def connection_resolver(cls, resolver: Any, connection_type: Any, root: Any, info: Any, **args: Any) -> Any: | ||
... | ||
|
||
def get_resolver(self, parent_resolver: Any) -> Any: | ||
... | ||
|
||
|
||
ConnectionField = IterableConnectionField |
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,24 @@ | ||
from ..types import Field as Field, InputObjectType as InputObjectType, String as String | ||
from ..types.mutation import Mutation as Mutation | ||
from ..utils.thenables import maybe_thenable as maybe_thenable | ||
from typing import Any, Optional | ||
|
||
|
||
class ClientIDMutation(Mutation): | ||
class Meta: | ||
abstract: bool = ... | ||
|
||
@classmethod | ||
def __init_subclass_with_meta__( # type: ignore[override] | ||
cls, | ||
output: Optional[Any] = ..., | ||
input_fields: Optional[Any] = ..., | ||
arguments: Optional[Any] = ..., | ||
name: Optional[Any] = ..., | ||
**options: Any | ||
) -> None: | ||
... | ||
|
||
@classmethod | ||
def mutate(cls, root: Any, info: Any, input: Any) -> Any: | ||
... |
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,81 @@ | ||
from ..types import Field as Field, ID as ID, Interface as Interface, ObjectType as ObjectType | ||
from ..types.interface import InterfaceOptions as InterfaceOptions | ||
from ..types.utils import get_type as get_type | ||
from typing import Any, Optional | ||
|
||
|
||
def is_node(objecttype: Any) -> Any: | ||
... | ||
|
||
|
||
class GlobalID(Field): | ||
node: Any = ... | ||
parent_type_name: Any = ... | ||
|
||
def __init__( | ||
self, | ||
node: Optional[Any] = ..., | ||
parent_type: Optional[Any] = ..., | ||
required: bool = ..., | ||
*args: Any, | ||
**kwargs: Any | ||
) -> None: | ||
... | ||
|
||
@staticmethod | ||
def id_resolver( | ||
parent_resolver: Any, node: Any, root: Any, info: Any, parent_type_name: Optional[Any] = ..., **args: Any | ||
) -> Any: | ||
... | ||
|
||
def get_resolver(self, parent_resolver: Any) -> Any: | ||
... | ||
|
||
|
||
class NodeField(Field): | ||
node_type: Any = ... | ||
field_type: Any = ... | ||
|
||
def __init__( | ||
self, | ||
node: Any, | ||
type: bool = ..., | ||
deprecation_reason: Optional[Any] = ..., | ||
name: Optional[Any] = ..., | ||
**kwargs: Any | ||
) -> None: | ||
... | ||
|
||
def get_resolver(self, parent_resolver: Any) -> Any: | ||
... | ||
|
||
|
||
class AbstractNode(Interface): | ||
class Meta: | ||
abstract: bool = ... | ||
|
||
@classmethod | ||
def __init_subclass_with_meta__(cls, **options: Any) -> None: # type: ignore[override] | ||
... | ||
|
||
|
||
class Node(AbstractNode): | ||
@classmethod | ||
def Field(cls, *args: Any, **kwargs: Any) -> Any: | ||
... | ||
|
||
@classmethod | ||
def node_resolver(cls, only_type: Any, root: Any, info: Any, id: Any) -> Any: | ||
... | ||
|
||
@classmethod | ||
def get_node_from_global_id(cls, info: Any, global_id: Any, only_type: Optional[Any] = ...) -> Any: | ||
... | ||
|
||
@classmethod | ||
def from_global_id(cls, global_id: Any) -> Any: | ||
... | ||
|
||
@classmethod | ||
def to_global_id(cls, type: Any, id: Any) -> Any: | ||
... |
Empty file.
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,21 @@ | ||
from ...types import Argument as Argument, Field as Field, Int as Int, List as List, NonNull as NonNull, ObjectType as ObjectType, Schema as Schema, String as String | ||
from ..connection import Connection as Connection, ConnectionField as ConnectionField, PageInfo as PageInfo | ||
from ..node import Node as Node | ||
from typing import Any | ||
|
||
class MyObject(ObjectType): | ||
class Meta: | ||
interfaces: Any = ... | ||
field: Any = ... | ||
|
||
def test_connection() -> None: ... | ||
def test_connection_inherit_abstracttype() -> None: ... | ||
def test_connection_name() -> None: ... | ||
def test_edge() -> None: ... | ||
def test_edge_with_bases() -> None: ... | ||
def test_edge_with_nonnull_node() -> None: ... | ||
def test_pageinfo() -> None: ... | ||
def test_connectionfield() -> None: ... | ||
def test_connectionfield_node_deprecated() -> None: ... | ||
def test_connectionfield_custom_args() -> None: ... | ||
def test_connectionfield_required() -> Any: ... |
Oops, something went wrong.