Skip to content

Commit 0b92d3d

Browse files
authored
Merge pull request #500 from graphql-python/2.0
[WIP] Road to 2.0
2 parents 557ec44 + 7eb3ab5 commit 0b92d3d

File tree

103 files changed

+2685
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2685
-1039
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ target/
8080
# Databases
8181
*.sqlite3
8282
.vscode
83+
.mypy_cache

.travis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: python
22
sudo: false
33
python:
44
- 2.7
5-
- 3.4
65
- 3.5
6+
- 3.6
77
- pypy
88
before_install:
99
- |
@@ -26,13 +26,19 @@ install:
2626
python setup.py develop
2727
elif [ "$TEST_TYPE" = lint ]; then
2828
pip install flake8
29+
elif [ "$TEST_TYPE" = mypy ]; then
30+
pip install mypy
2931
fi
3032
script:
3133
- |
3234
if [ "$TEST_TYPE" = lint ]; then
3335
echo "Checking Python code lint."
3436
flake8 graphene
3537
exit
38+
elif [ "$TEST_TYPE" = mypy ]; then
39+
echo "Checking Python types."
40+
mypy graphene
41+
exit
3642
elif [ "$TEST_TYPE" = build ]; then
3743
py.test --cov=graphene graphene examples
3844
fi
@@ -51,10 +57,13 @@ matrix:
5157
include:
5258
- python: '2.7'
5359
env: TEST_TYPE=lint
60+
- python: '3.6'
61+
env: TEST_TYPE=mypy
5462
deploy:
5563
provider: pypi
5664
user: syrusakbary
5765
on:
5866
tags: true
5967
password:
6068
secure: LHOp9DvYR+70vj4YVY8+JRNCKUOfYZREEUY3+4lMUpY7Zy5QwDfgEMXG64ybREH9dFldpUqVXRj53eeU3spfudSfh8NHkgqW7qihez2AhSnRc4dK6ooNfB+kLcSoJ4nUFGxdYImABc4V1hJvflGaUkTwDNYVxJF938bPaO797IvSbuI86llwqkvuK2Vegv9q/fy9sVGaF9VZIs4JgXwR5AyDR7FBArl+S84vWww4vTFD33hoE88VR4QvFY3/71BwRtQrnCMm7AOm31P9u29yi3bpzQpiOR2rHsgrsYdm597QzFKVxYwsmf9uAx2bpbSPy2WibunLePIvOFwm8xcfwnz4/J4ONBc5PSFmUytTWpzEnxb0bfUNLuYloIS24V6OZ8BfAhiYZ1AwySeJCQDM4Vk1V8IF6trTtyx5EW/uV9jsHCZ3LFsAD7UnFRTosIgN3SAK3ZWCEk5oF2IvjecsolEfkRXB3q9EjMkkuXRUeFDH2lWJLgNE27BzY6myvZVzPmfwZUsPBlPD/6w+WLSp97Rjgr9zS3T1d4ddqFM4ZYu04f2i7a/UUQqG+itzzuX5DWLPvzuNt37JB45mB9IsvxPyXZ6SkAcLl48NGyKok1f3vQnvphkfkl4lni29woKhaau8xlsuEDrcwOoeAsVcZXiItg+l+z2SlIwM0A06EvQ=
69+
distributions: "sdist bdist_wheel"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Please read [UPGRADE-v1.0.md](/UPGRADE-v1.0.md) to learn how to upgrade to Graphene `1.0`.
1+
Please read [UPGRADE-v2.0.md](/UPGRADE-v2.0.md) to learn how to upgrade to Graphene `2.0`.
22

33
---
44

@@ -32,12 +32,12 @@ Also, Graphene is fully compatible with the GraphQL spec, working seamlessly wit
3232
For instaling graphene, just run this command in your shell
3333

3434
```bash
35-
pip install "graphene>=1.0"
35+
pip install "graphene>=2.0.dev"
3636
```
3737

38-
## 1.0 Upgrade Guide
38+
## 2.0 Upgrade Guide
3939

40-
Please read [UPGRADE-v1.0.md](/UPGRADE-v1.0.md) to learn how to upgrade.
40+
Please read [UPGRADE-v2.0.md](/UPGRADE-v2.0.md) to learn how to upgrade.
4141

4242

4343
## Examples
@@ -48,7 +48,7 @@ Here is one example for you to get started:
4848
class Query(graphene.ObjectType):
4949
hello = graphene.String(description='A typical hello world')
5050

51-
def resolve_hello(self, args, context, info):
51+
def resolve_hello(self, info):
5252
return 'World'
5353

5454
schema = graphene.Schema(query=Query)

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Please read `UPGRADE-v1.0.md </UPGRADE-v1.0.md>`__ to learn how to
2-
upgrade to Graphene ``1.0``.
1+
Please read `UPGRADE-v2.0.md </UPGRADE-v2.0.md>`__ to learn how to
2+
upgrade to Graphene ``2.0``.
33

44
--------------
55

@@ -11,7 +11,7 @@ building GraphQL schemas/types fast and easily.
1111

1212
- **Easy to use:** Graphene helps you use GraphQL in Python without
1313
effort.
14-
- **Relay:** Graphene has builtin support for both Relay.
14+
- **Relay:** Graphene has builtin support for Relay.
1515
- **Data agnostic:** Graphene supports any kind of data source: SQL
1616
(Django, SQLAlchemy), NoSQL, custom Python objects, etc. We believe
1717
that by providing a complete API you could plug Graphene anywhere
@@ -47,12 +47,12 @@ For instaling graphene, just run this command in your shell
4747

4848
.. code:: bash
4949
50-
pip install "graphene>=1.0"
50+
pip install "graphene>=2.0"
5151
52-
1.0 Upgrade Guide
52+
2.0 Upgrade Guide
5353
-----------------
5454

55-
Please read `UPGRADE-v1.0.md </UPGRADE-v1.0.md>`__ to learn how to
55+
Please read `UPGRADE-v2.0.md </UPGRADE-v2.0.md>`__ to learn how to
5656
upgrade.
5757

5858
Examples
@@ -65,7 +65,7 @@ Here is one example for you to get started:
6565
class Query(graphene.ObjectType):
6666
hello = graphene.String(description='A typical hello world')
6767
68-
def resolve_hello(self, args, context, info):
68+
def resolve_hello(self, info):
6969
return 'World'
7070
7171
schema = graphene.Schema(query=Query)

0 commit comments

Comments
 (0)