A lightweight graphQL library
Project description
GraphCall
License
This project is licensed under the GNU GPLv3 License
Introduction
Back when I first discovered GraphQL, I started using it for y data driven projects.
But I was in shock when I saw that no good java framework was able to make a decent request.
I decided to make one then...
Use case
import com.nwmqpa.graphcall.requests.Query;
public class Main {
public int main(String argv[]) {
Query query = new Query();
query.addNode("hero")
.addNode("friends")
.addEdge("friendsName")
.buildNode()
.addEdge("name");
System.out.println(query.compile);
Request request = new Request(query.compile());
Result result = request.send(new URL("http://api.example.com/graphql/"));
System.out.println(result.data);
return (0);
}
}
Resolves to ...
query {
hero {
friends {
friendsName
}
name
}
}
{"data": {
"hero": [
{
"friends": [
{
"friendsName": "Leia"
},
{
"firendsName": "Han"
}
],
"name": "Luke"
}
]
}
}
TODO
-
Make mutation resolves correcty
-
Implement queries arguments.
-
Implements fragments and name queries.
Credits
Thomas Nicollet (@nwmqpa)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
graphcall-0.0.15.tar.gz
(3.2 kB
view details)
File details
Details for the file graphcall-0.0.15.tar.gz
.
File metadata
- Download URL: graphcall-0.0.15.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3d9a12ae4a9124345cfd96f1b56200c92183a541ae9d472e83edd4936a5721f |
|
MD5 | f53159441564bfea42f17933835a9b99 |
|
BLAKE2b-256 | 77085daff82dc009d0912914753d190bb66c0f167f5c8ce1c216756e5c8966eb |