Skip to content

Commit 0f94f2b

Browse files
committed
Improved homepage
1 parent e5357cc commit 0f94f2b

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

docs/css/main.styl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ $title
362362
.docs
363363
@extend $wrapper
364364

365+
.homepage-intro
366+
col(1/2)
367+
368+
.homepage-schema
369+
col(1/2)
370+
365371
.docs-aside
366372
col(1/4)
367373
margin-top 60px

docs/pages/docs/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Let's build a basic GraphQL schema from scratch.
1010

1111
## Requirements
1212

13-
- Python (2.6.5+, 2.7, 3.2, 3.3, 3.4, 3.5, pypy)
14-
- Graphene (0.4+)
13+
- Python (2.7, 3.2, 3.3, 3.4, 3.5, pypy)
14+
- Graphene (0.10+)
1515

1616

1717
## Project setup

docs/pages/index.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,50 @@ path: /
33
---
44
<div class="starwars-example-wrapper"><a class="starwars-example" href="http://swapi.graphene-python.org/">Check our Django Starwars API example!</a></div>
55

6+
7+
<div>
8+
<div class="homepage-intro">
9+
610
## Meet Graphene
711

8-
Graphene is a Python library for building GraphQL schemas/types fast and easily.
12+
Graphene is a Python library for building *GraphQL* schemas/types fast and easily.
13+
14+
15+
* **Easy to use**: Graphene helps you use *GraphQL* in Python easily.
16+
* Graphene has **builtin support for Relay**.
17+
* Support for **Django**, **SQLAlchemy** and **GAE**: mapping the models automatically to *GraphQL* types.
18+
19+
</div>
20+
21+
<div class="homepage-schema">
22+
23+
```python
24+
import graphene
25+
26+
class Query(graphene.ObjectType):
27+
hello = graphene.String()
28+
29+
def resolve_hello(self, args, info):
30+
return 'world'
31+
32+
schema = graphene.Schema(query=Query)
33+
```
34+
35+
36+
```python
37+
result = schema.execute('{ hello }')
38+
```
39+
40+
</div>
41+
</div>
42+
43+
<div>
44+
45+
#### What is GraphQL?
46+
*GraphQL* is a data query language and runtime designed to request and deliver data in a performant way.
947

10-
**But, what is GraphQL?** A GraphQL query is a string interpreted by a server that returns data in a specified format. We believe *GraphQL* is the next big thing after peanut butter and *REST*.
48+
Advantages of using *GraphQL*:
49+
* Only **one API endpoint**. One roundtrip for fetch everything you need.
50+
* No data overfetching or underfetching.
51+
* Autogenerated Graphical UI and docs based in your schema.
52+
<div>

0 commit comments

Comments
 (0)