{
"author": {
"username": "dave",
"posts": [
{
"title": "AWESOME GraphQL",
"votes": 5,
"createdAt": "23-01-2018"
},
{
"title": "Hello World",
"votes": 2,
"createdAt": "21-01-2018"
},
]
}
}
Not a server,
Not an implementation
Spec and reference implementation
in 10+ languages today
Simple patter for resolving fields on the server
import graphene
class Query(graphene.ObjectType):
hello = graphene.String(name=graphene.String(default_value="stranger"))
def resolve_hello(self, info, name):
return 'Hello ' + name
schema = graphene.Schema(query=Query)
on the client
Like Relay and Apollo
AKA Mutations
graphiql
graphql-faker
type Person {
name: String @fake(type: firstName)
gender: String @examples(values: ["male", "female"])
}
graphql-voyager
for Introspection, typing, linting, etc.