name | description | github |
---|---|---|
GraphQLClient.jl |
A Julia GraphQL client for seamless integration with a GraphQL server |
DeloitteDigitalAPAC/GraphQLClient.jl |
- Querying, mutating and subscribing without manual writing of query strings (unless you want to!)
- Deserializing responses directly into Julia types
- Construction of Julia types from GraphQL objects
- Using introspection to help with querying
Install with Julia's package manager
using Pkg; Pkg.add("GraphQLClient")
using GraphQLClient
Connect to a server
client = Client("https://countries.trevorblades.com")
Build a Julia type from a GraphQL object
Country = GraphQLClient.introspect_object(client, "Country")
And query the server, deserializing the response into this new type
response = query(client, "countries", Vector{Country}, output_fields="name")
Alternatively write the query string manually
query_string = """
{
countries{
name
}
}"""
response = GraphQLClient.execute(client, query_string)