Skip to content

Instantly share code, notes, and snippets.

@bruce
Last active March 28, 2017 23:07
Show Gist options
  • Save bruce/a034b703b7172bcb048ca23172827658 to your computer and use it in GitHub Desktop.
Save bruce/a034b703b7172bcb048ca23172827658 to your computer and use it in GitHub Desktop.
Silly FS GraphQL Executable
{
cwd {
basename
... on Directory {
entries {
basename
... on Directory {
basename
stat {
size
mtime
type
access
}
}
}
}
}
}
$ cat info.graphql | ./fileql
{:ok,
%{data: %{"cwd" => %{"basename" => "fileql",
"entries" => [%{"basename" => ".gitignore"},
%{"basename" => "README.md"},
%{"basename" => "_build",
"stat" => %{"access" => "READ_WRITE",
"mtime" => "2017-03-28T21:57:59Z", "size" => 102,
"type" => "DIRECTORY"}},
%{"basename" => "config",
"stat" => %{"access" => "READ_WRITE",
"mtime" => "2017-03-28T21:54:38Z", "size" => 102,
"type" => "DIRECTORY"}},
%{"basename" => "deps",
"stat" => %{"access" => "READ_WRITE",
"mtime" => "2017-03-28T21:57:59Z", "size" => 102,
"type" => "DIRECTORY"}}, %{"basename" => "fileql"},
%{"basename" => "lib",
"stat" => %{"access" => "READ_WRITE",
"mtime" => "2017-03-28T21:55:53Z", "size" => 136,
"type" => "DIRECTORY"}}, %{"basename" => "mix.exs"},
%{"basename" => "mix.lock"},
%{"basename" => "test",
"stat" => %{"access" => "READ_WRITE",
"mtime" => "2017-03-28T21:54:38Z", "size" => 136,
"type" => "DIRECTORY"}}]}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment