API Reference

TheGraphData.client!Method
client!(u::AbstractString; introspect=false)
client!(c::GraphQLClient.Client)

Set the provided url (u) or client (c) as the new global client.

By default, we decide to not introspect as its much slower to do so if you don't need to. However, if your use-case could benefit from introspection, you should set it to true. If you're unsure, benchmark both approaches in the context of your code and see what works.

source
TheGraphData.dicttontMethod
dicttont(d::Dict)

Convert a dictionary to a namedtuple. The keys of the dictionary must be symbols.

source
TheGraphData.flattenMethod
flatten(d::Dict)

Flatten a dictionary d.

For example, for Dict(:a => Dict(:b => 2)), the resulting dictionary would be Dict(:(a.b) => 2).

source
TheGraphData.flextableMethod
flextable(d::AbstractVector{D}) where {D<:Dict}
flextable(d::CSV.File)
flextable(d::NamedTuple)

Convert the queried data d to a FlexTable.

source
TheGraphData.mutateMethod
mutate(v::AbstractString, a::AbstractDict)

Send a mutation to the client for value v with arguments a.

By default, the client is the gateway. This function returns a GQL response.

source
TheGraphData.paginated_queryMethod
paginated_query(
    v::AbstractString, a::Dict, f::AbstractVector{S}
) where {S<:AbstractString}

Query the client using comparator-based pagination.

By default, the client is the gateway. This function returns a vector of dictionaries. Unless you know what you're doing, you should probably prefer this function to query.

source
TheGraphData.queryMethod
query(
    v::AbstractString, a::Dict, f::AbstractVector{S}
) where {S<:AbstractString}

Query the client for value v with arguments a and fields f.

By default, the client is the gateway. This function returns a vector of dictionaries. Unless you know what you're doing, you should probably prefer paginated_query to this function.

source
TheGraphData.readMethod
read(f::AbstractString; kwargs...)
read(::Union{Val{:csv},Val{:txt}}, f::AbstractString; kwargs...)

Read the data from the filepath f with kwargs.

This function is unexported. It will raise a MethodError if the specified filetype and datatype are not yet implemented. Please submit a PR or feature request if you want this particular combo to be supported.

source
TheGraphData.setdefault!Method
setdefault!(d::Dict, k, v)

Set the value in the collection if it doesn't exist.

Similar to Python's setdefault when used on dictionaries. On vectors, this checks if the value is in the vector, and adds it if it isn't. This does not work on nested vectors.

source
TheGraphData.tableMethod
table(d::AbstractVector{D}) where {D<:Dict}
table(d::CSV.File)
table(d::NamedTuple)

Convert the queried data d to a TypedTable.

source
TheGraphData.writeMethod
write(f::AbstractString, d; kwargs...)
write(v::Val, f::AbstractString, d; kwargs...)
write(::IsCSV, f::AbstractString, d::T; kwargs...) where {T<:Table}
write(::IsCSV, f::AbstractString, d::T; kwargs...) where {T<:FlexTable}
write(::IsCSV, f::AbstractString, d::D; kwargs...) where {D<:Dict}

Write the data d to the filepath f with kwargs.

This function is unexported. It will raise a MethodError if the specified filetype and datatype are not yet implemented. Please submit a PR or feature request if you want this particular combo to be supported.

source