Hi everyone.
I am using irmin and irmin-graphql. There is one thing I noticed while I am using irmin-graphql client. The thing is graphql query result of sub directories are represented reversibly. For example this is the query in graphql:
{
master {
tree {
get_tree(key: "/src/ppx_irmin/lib") {
list {
key
__typename
}
}
}
}
}
and this is the output:
"list": [
{
"key": "/lib/ppx_irmin/src/algebraic.ml",
"__typename": "Contents"
},
{
"key": "/lib/ppx_irmin/src/algebraic.mli",
"__typename": "Contents"
},
So you can see that /src/ppx_irmin/lib
becomes /lib/ppx_irmin/src/
. I would’t mind that much normally but I am trying to create a client from this queries. Therefore these reverse keys doesn’t help for the automation. I have to split and reverse them each and every time.
Is this a bug or the normal way of the query result?
- irmin 2.1.0
- opam 2.0.6
- ocaml 4.09.0
I guess you can reproduce it with steps below:
opam install irmin irmin-git irmin-graphql
mkdir /tmp/irmin
cd /tmp/irmin
irmin clone -s git https://github.com/mirage/irmin.git
irmin graphql --port 9876 --root /tmp/irmin
# browse http://localhost:9876/graphql