API Reference
TheGraphData.client! — Methodclient!(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.
TheGraphData.dicttont — Methoddicttont(d::Dict)Convert a dictionary to a namedtuple. The keys of the dictionary must be symbols.
TheGraphData.flatten — Methodflatten(d::Dict)Flatten a dictionary d.
For example, for Dict(:a => Dict(:b => 2)), the resulting dictionary would be Dict(:(a.b) => 2).
TheGraphData.flextable — Methodflextable(d::AbstractVector{D}) where {D<:Dict}
flextable(d::CSV.File)
flextable(d::NamedTuple)Convert the queried data d to a FlexTable.
TheGraphData.mutate — Methodmutate(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.
TheGraphData.paginated_query — Methodpaginated_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.
TheGraphData.query — Methodquery(
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.
TheGraphData.querytypehelper — Methodquerytypehelper(v::Vector{Dict})
querytypehelper(v::Dict)Ensure output of query is type-stable.
TheGraphData.read — Methodread(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.
TheGraphData.setdefault! — Methodsetdefault!(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.
TheGraphData.splitextsym — Methodsplitextsym(f::AbstractString)Get the extension of the filepath f as a symbol.
This function is unexported.
TheGraphData.symbolkeys — Methodsymbolkeys(d::Dict)Convert a dictionary's string keys to symbols
TheGraphData.table — Methodtable(d::AbstractVector{D}) where {D<:Dict}
table(d::CSV.File)
table(d::NamedTuple)Convert the queried data d to a TypedTable.
TheGraphData.write — Methodwrite(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.