Skip to content

Commit 4768a2f

Browse files
committed
Remove jitpack
1 parent 1503563 commit 4768a2f

1 file changed

File tree

‎README.md‎

-224 Bytes

Java-GraphQL-Client

Simple GraphQL client for Java The only dependecy is google gson!

Build Status

Build Status

    
    //Data class
    public class User {
        public String id, name, email;
    }
    //Create a client object
    Client client = new Client("https://api.mocki.io/v1/44cb3920");
    
    //For example we can set global variables and headers
    client.setGlobalVariable("someId", "1");
    client.setHeader("auth", "someAuthToken")

    //Find a user in the GraphQL api
    User user = client.first(
            new Query("query user($id: ID!) { user(id: $id) { id, name, email } }").setVariable("id", "1"),
               "user",
               User.class
        );
    System.out.println(user)

0 commit comments

Comments
 (0)