Skip to content

Commit

Permalink
Merge pull request #500 from graphql-python/2.0
Browse files Browse the repository at this point in the history
[WIP] Road to 2.0
  • Loading branch information
syrusakbary committed Aug 27, 2017
2 parents 557ec44 + 7eb3ab5 commit 0b92d3d
Show file tree
Hide file tree
Showing 103 changed files with 2,685 additions and 1,039 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ target/
# Databases
*.sqlite3
.vscode
.mypy_cache
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: python
sudo: false
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
before_install:
- |
Expand All @@ -26,13 +26,19 @@ install:
python setup.py develop
elif [ "$TEST_TYPE" = lint ]; then
pip install flake8
elif [ "$TEST_TYPE" = mypy ]; then
pip install mypy
fi
script:
- |
if [ "$TEST_TYPE" = lint ]; then
echo "Checking Python code lint."
flake8 graphene
exit
elif [ "$TEST_TYPE" = mypy ]; then
echo "Checking Python types."
mypy graphene
exit
elif [ "$TEST_TYPE" = build ]; then
py.test --cov=graphene graphene examples
fi
Expand All @@ -51,10 +57,13 @@ matrix:
include:
- python: '2.7'
env: TEST_TYPE=lint
- python: '3.6'
env: TEST_TYPE=mypy
deploy:
provider: pypi
user: syrusakbary
on:
tags: true
password:
secure: LHOp9DvYR+70vj4YVY8+JRNCKUOfYZREEUY3+4lMUpY7Zy5QwDfgEMXG64ybREH9dFldpUqVXRj53eeU3spfudSfh8NHkgqW7qihez2AhSnRc4dK6ooNfB+kLcSoJ4nUFGxdYImABc4V1hJvflGaUkTwDNYVxJF938bPaO797IvSbuI86llwqkvuK2Vegv9q/fy9sVGaF9VZIs4JgXwR5AyDR7FBArl+S84vWww4vTFD33hoE88VR4QvFY3/71BwRtQrnCMm7AOm31P9u29yi3bpzQpiOR2rHsgrsYdm597QzFKVxYwsmf9uAx2bpbSPy2WibunLePIvOFwm8xcfwnz4/J4ONBc5PSFmUytTWpzEnxb0bfUNLuYloIS24V6OZ8BfAhiYZ1AwySeJCQDM4Vk1V8IF6trTtyx5EW/uV9jsHCZ3LFsAD7UnFRTosIgN3SAK3ZWCEk5oF2IvjecsolEfkRXB3q9EjMkkuXRUeFDH2lWJLgNE27BzY6myvZVzPmfwZUsPBlPD/6w+WLSp97Rjgr9zS3T1d4ddqFM4ZYu04f2i7a/UUQqG+itzzuX5DWLPvzuNt37JB45mB9IsvxPyXZ6SkAcLl48NGyKok1f3vQnvphkfkl4lni29woKhaau8xlsuEDrcwOoeAsVcZXiItg+l+z2SlIwM0A06EvQ=
distributions: "sdist bdist_wheel"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Please read [UPGRADE-v1.0.md](/UPGRADE-v1.0.md) to learn how to upgrade to Graphene `1.0`.
Please read [UPGRADE-v2.0.md](/UPGRADE-v2.0.md) to learn how to upgrade to Graphene `2.0`.

---

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

```bash
pip install "graphene>=1.0"
pip install "graphene>=2.0.dev"
```

## 1.0 Upgrade Guide
## 2.0 Upgrade Guide

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


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

def resolve_hello(self, args, context, info):
def resolve_hello(self, info):
return 'World'

schema = graphene.Schema(query=Query)
Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Please read `UPGRADE-v1.0.md </UPGRADE-v1.0.md>`__ to learn how to
upgrade to Graphene ``1.0``.
Please read `UPGRADE-v2.0.md </UPGRADE-v2.0.md>`__ to learn how to
upgrade to Graphene ``2.0``.

--------------

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

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

.. code:: bash
pip install "graphene>=1.0"
pip install "graphene>=2.0"
1.0 Upgrade Guide
2.0 Upgrade Guide
-----------------

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

Examples
Expand All @@ -65,7 +65,7 @@ Here is one example for you to get started:
class Query(graphene.ObjectType):
hello = graphene.String(description='A typical hello world')
def resolve_hello(self, args, context, info):
def resolve_hello(self, info):
return 'World'
schema = graphene.Schema(query=Query)
Expand Down
Loading

0 comments on commit 0b92d3d

Please sign in to comment.